EventTarget : Object EventTargets are Objects that fire events. EventTargets usually expose an onevent property for each event where you can assign a %%/Function|Function%% to be called when the event fires. You can also use %%#addEventListener|**addEventListener()**%% to hook up multiple listeners to the same event. Spec: https://dom.spec.whatwg.org/#interface-eventtarget ---- prototype.addEventListener(type : String, listener(event : Event) : undefined, [useCapture : Boolean]) : undefined Adds **listener** to the list of callbacks called when the specified event is fired. If **useCapture** is true, **listener** will be called in the capture phase of the event routing (ie, during the walk down the tree to the target instead of on the way up after firing on the target). Unlike using the onevent style of listening to events, **addEventListener** allows more than one listener to be associated with the event. Use %%#removeEventListener|**removeEventListener()**%% to stop listening to the event.
---- prototype.addEventListener( \ type : String, \ listener(event : Event) : undefined, \ options : { \ capture = false: Boolean /* call listener in the capture phase */, \ once = false: Boolean /* remove **listener** after firing */, \ passive = false: Boolean /* set to **true** if you'll never call %%/Event#preventDefault|**event.preventDefault()**%%. Allows browser to provide perf optimizations like smoother scrolling. */ \ }) : undefined ---- prototype.addEventListener(type : String, listener : EventListener, [useCapture : Boolean]) : undefined ---- prototype.addEventListener( \ type : String, \ listener : EventListener, \ options : { \ capture = false: Boolean /* call listener in the capture phase */, \ once = false: Boolean /* remove **listener** after firing */, \ passive = false: Boolean /* set to **true** if you'll never call %%/Event#preventDefault|**event.preventDefault()**%%. Allows browser to provide perf optimizations like smoother scrolling. */ \ }) : undefined ---- prototype.removeEventListener(type : String, listener(event : Event) : undefined, [useCapture : Boolean]) : undefined ---- prototype.removeEventListener( \ type : String, \ listener(event : Event) : undefined, \ options : { \ capture = false: Boolean /* removes the listener hooked to the capture phase */ \ }) : undefined ---- prototype.removeEventListener(type : String, listener : EventListener, [useCapture : Boolean]) : undefined ---- prototype.removeEventListener( \ type : String, \ listener : EventListener, \ options : { \ capture = false: Boolean /* removes the listener hooked to the capture phase */ \ }) : undefined ---- prototype.dispatchEvent(event : Event) : Boolean