Function getParent

  • getParent(elem: AnyNode): ParentNode | null
  • Get a node's parent.

    Returns

    elem's parent node, or null if elem is a root node.

    Parameters

    • elem: AnyNode

      Node to get the parent of.

    Returns ParentNode | null