json-dom
    Preparing search index...

    Function getItemByElement

    • Find the item (item itself, or one of its descendants) whose element is the one given, or null when none match. Only searches item and its own subtree: an event's target is always the item a listener is attached to, or one of its descendants (that is what bubbling means), so there is never a reason to search outside it. WARNING: This is a recursive function.

      Parameters

      • item: DomItem

        The DomItem (and its subtree) to search.

      • element: EventTarget | null

        The real element to match against each item's element.

      Returns DomItem | null