Similar to matchListener function but has methods for attaching and removing itself from multiple elements at the same time.

This gives the listener a 'personality' and promotes its reuse (good practice).

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

listener: EventListenerOrEventListenerObject

Methods

  • Parameters

    • eventName: string
    • elements: EventTarget[]
    • Optional options: boolean | AddEventListenerOptions

    Returns void