Dispatches an event into the event system. The event is subject to the same capturing and bubbling behavior as directly dispatched events.
bool = element.dispatchEvent(event)
targetof the event.
eventis an event object to be dispatched.
- The return value is
falseif at least one of the event handlers which handled this event called preventDefault. Otherwise it returns
To read an example of triggering a custom event, see Creating and triggering custom events
As demonstrated in the above example,
dispatchEvent is the last step of the create-init-dispatch process, which is used for dispatching events into the implementation's event model.
See also the Event object reference.