Function trackEventListener

  • Keep records on whether an event listener has been added.


    • target: EventTarget

      EventTarget to override.

    Returns Record<string, boolean>

    Map from event type to whether listeners may exist.

    This may allow EventTarget subclass to skip certain event generation code paths. Tracking is imprecise: it does not consider once() and removeEventListener().