utils/dom/getancestors
module
Functions
-
getAncestors( node ) → Array<Node>module:utils/dom/getancestors~getAncestorsReturns all ancestors of given DOM node, starting from the top-most (root). Includes the given node itself. If the node is a part of
DocumentFragmentthatDocumentFragmentwill be returned. In contrary, if the node is appended to aDocument, thatDocumentwill not be returned (algorithms operating on DOM tree care forDocument#documentElementat most, which will be returned).Parameters
node : NodeDOM node.
Returns
Array<Node>Array of given
nodeparents.