Function addEventListener

Add event listener(s) to one or more Node elements

  • Parameters

    • element:
          | HTMLElement
          | NodeListOf<HTMLElement>
          | HTMLCollectionOf<HTMLElement>
          | HTMLElement[]

      One or multiple Node element(s) to set listener(s) for

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

      List of event types and related callback(s)

    Returns void

    void