Function findMatchingAncestor

  • Recursively search for an ancestor of the starting element that passes the given callback.

    Parameters

    • start: Element
    • testParent: (parent: Element) => boolean

    Returns Element | undefined