Function addAsyncEventListener

Listen to events fired on elements that may currently not exist in the DOM

  • Parameters

    • elementSelector: string

      Selector for element(s) to match event target

    • listeners: Record<string, EventListener | EventListener[]>

      List of event types and related callback(s)

    • acceptBubbling: boolean = true

      Boolean switch to allow bubbling or accept only direct element match

    Returns void

    void