Glossary Term
EventTarget.dispatchEvent()
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
Calling dispatchEvent() is the last step to firing an event. The event should have already been created and initialized using an Event() constructor.
Note: When calling this method, the Event.target property is initialized to the current EventTarget.
Unlike “native” events, which the browser fires by queuing a task on the event loop, dispatchEvent() invokes all applicable event handlers synchronously before returning. The read-only isTrusted property is true for native events and false for events dispatched with dispatchEvent().
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
