parent_node property

parent_node property

Returns the parent of the specified node in the DOM tree.

Document and DocumentFragment nodes can never have a parent, so will always return null. It also returns if the node has just been created and is not yet attached to the tree.

Remarks

Reference:

DOM Standard.

Definition:

@property
def parent_node(self):
    ...

See Also