utils/dom/isshadowhostof
module
Functions
isShadowHostOf( node, shadowRoots ) → booleanmodule:utils/dom/isshadowhostof~isShadowHostOfChecks whether the given node is the host of any of the given shadow roots.
Answers "is this a stand-in for something inside one of these roots, rather than the real thing?". A DOM API that cannot reach into a shadow tree reports its host in place of the node inside it – most commonly an event target, retargeted for a listener that does not live in that tree. Works for open and closed roots alike.
Parameters
node: EventTarget | nullThe node to test.
shadowRoots: Iterable<ShadowRoot>The shadow roots to test against.
Returns
boolean