Merge pull request #72313 from matpl/master

Add shadow root support for isInDOM function
This commit is contained in:
Alexandru Dima
2019-07-22 10:52:00 +02:00
committed by GitHub

View File

@@ -34,7 +34,7 @@ export function isInDOM(node: Node | null): boolean {
if (node === document.body) {
return true;
}
node = node.parentNode;
node = node.parentNode || (node as ShadowRoot).host;
}
return false;
}