Constructs a new event target.
Protected ReadonlylistenerA collection of event listener functions.
Protected ReadonlylistenerA collection of event listener objects.
Registers an event handler of a specific event type on the event target.
The event type to listen for.
An event listener or callback.
Removes all listeners.
Dispatches an event at the specified event target, invoking the affected event listeners in the appropriate order.
Event listeners can safely be added and removed while an event is being dispatched.
https://262.ecma-international.org/#sec-map.prototype.foreach for more information on the iteration behavior.
Removes an event handler of a specific event type from the event target.
The event type to remove.
The event listener to remove.
Removes an event handler of a specific event type from the event target.
The event type to remove.
The event listener to remove.
An event target that can dispatch events to registered listeners.