vis-util
    Preparing search index...

    Function hasParent

    • Check if given element contains given parent somewhere in the DOM tree.

      Parameters

      • element: Element

        The element to be tested.

      • parent: Element

        The ancestor (not necessarily parent) of the element.

      Returns boolean

      True if parent is an ancestor of the element, false otherwise.