Registers an event handler of a specific event type. Adding the same handler again for the same type and phase does nothing, like the DOM.
The type of event to listen for
The function to call (or an object with a handleEvent function)
Listen while the event travels down to the target (true), or an object with capture, once and passive
Dispatches an event to this target and through the tree: capture listeners of the ancestors from the root down, then the listeners of this target, then (when the event bubbles) the other listeners of the ancestors from the parent up to the root. stopPropagation() stops it reaching further targets, stopImmediatePropagation() also stops the remaining listeners of the current target. Afterwards, unless the default was prevented, the default action of this target (see setDefaultEvent) runs. The event can be dispatched again afterwards.
The event to dispatch
False when the event was cancelable and a listener prevented the default, otherwise true
Removes an event listener, the one which was added with the same type, handler and phase.
The type of event
The handler which was added
Whether the listener was a capture listener (true), or an object with capture
ProtectedsetRegister the function to run when nothing else has prevented the default for this type of event.
Simulate the behaviour of the EventTarget Class when there is no DOM available. Dispatching an event sends it through the tree the way the DOM does: down from the root to the target (capture listeners), to the target itself, then back up to the root (the listeners which are not capture listeners, when the event bubbles).