@blinkk/degu
    Preparing search index...

    Function testDescendant

    • Tests whether a given element is a descendant of another elemenet.

      Examples:

       var isChild = dom.testDescendant(
      document.getElementById('button'),
      document.querySelector('.article'));

      // Whether the active focused element is under the article container.
      var isFocused = dom.testDescendant(document.activeElement,
      document.querySelector('.article'));

      Parameters

      • element: HTMLElement

        The child element

      • parentElement: HTMLElement

        The possible parent element

      Returns boolean

      Whether element is a descendant of the provided parent element.