dispatchEvent()

The method that sends an event object to a target so its listeners run, synchronously, before the call returns.

In more detail

Every listener has finished by the time dispatchEvent() returns. It returns false if the event was cancelable and a listener called preventDefault, which lets the sender ask listeners for permission before acting.

Related terms

Taught in

References