utils/dom/getparentelement
module
Functions
getParentElement( node ) → Element | nullmodule:utils/dom/getparentelement~getParentElementReturns the parent element of the given node, crossing shadow boundaries.
The shadow-aware replacement for
Node#parentElement, which isnullfor a node sitting directly in aShadowRootand so stops an outward walk at the boundary. Works for open and closed roots alike.Parameters
node: NodeThe node to get the parent element of.
Returns
Element | null