feat(change detection): add removeShadowDomChild
This commit is contained in:
parent
cb2e646332
commit
6ecaa9aebb
|
@ -33,6 +33,10 @@ export class AbstractChangeDetector extends ChangeDetector {
|
|||
cd.parent = this;
|
||||
}
|
||||
|
||||
removeShadowDomChild(cd:ChangeDetector) {
|
||||
ListWrapper.remove(this.shadowDomChildren, cd);
|
||||
}
|
||||
|
||||
remove() {
|
||||
this.parent.removeChild(this);
|
||||
}
|
||||
|
|
|
@ -484,6 +484,13 @@ export function main() {
|
|||
|
||||
expect(parent.lightDomChildren).toEqual([]);
|
||||
});
|
||||
|
||||
it("should remove shadow dom children", () => {
|
||||
parent.addShadowDomChild(child);
|
||||
parent.removeShadowDomChild(child);
|
||||
|
||||
expect(parent.shadowDomChildren.length).toEqual(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue