utils/dom/getparentnode
module
Functions
getParentNode( node ) → ParentNode | nullmodule:utils/dom/getparentnode~getParentNodeReturns the node one step up the composed tree, crossing shadow boundaries.
The shadow-aware replacement for
Node#parentNode, and the primitive for walking from a node outwards to the document. It steps over any node, so such a walk visits theShadowRootnodes on the way and reaches theDocumentat the top – to walk elements only, usegetParentElement. Works for open and closed roots alike.Parameters
node: NodeThe node to step up from.
Returns
ParentNode | null