dispatchEvent
Dispatches the event to the list of handlers for Event.type.
The registered event listeners is synchronously invoked in the order they were registered.
Return
true
if either event's cancelable attribute value is false
or its preventDefault()
method was not invoked, otherwise false
.
Parameters
event
The event to dispatch.