EventTarget interface is implemented by objects that can receive events and may have listeners for them.
In other words, any target of events implements the three methods associated with this interface.
Element, and its children, as well as
Window, are the most common event targets,
but other objects can be event targets, too.
AudioContext are also event targets.
Many event targets (including elements, documents, and windows) also support setting event handlers via
onevent properties and attributes.
Creates a new
Registers an event handler of a specific event type on the
Removes an event listener from the
Dispatches an event to this
|DOM Standard |
BCD tables only load in the browser
- Event reference – the events available in the platform.
- Introduction to events