/html-dom
/Basic
GitHub 4932★
Get the parent node of an element
Returns the parent node of the
ele
element:
const
parent
=
ele
.
parentNode
;
See also
Check if an element is a descendant of another
Get the first scrollable parent of an element
Select the children of an element
Swap two nodes
Zoom an image
Get the first scrollable parent of an element
Get the position of an element relative to the document
Follow me on
Twitter
and
GitHub
to get more useful contents.