EventTarget

The built-in browser interface for anything that can receive events, providing addEventListener, removeEventListener and dispatchEvent.

In more detail

Listeners on an EventTarget are called in the order they were added. Elements, window and many other objects implement it, and you can create or extend it yourself to build an event bus without any library.

Related terms

Taught in

References