Class: Target


A simplified implementation of the W3C DOM Level 2 EventTarget interface. See

There are two important simplifications compared to the specification:

  1. The handling of useCapture in addEventListener and removeEventListener. There is no real capture model.
  2. The handling of stopPropagation and preventDefault on dispatchEvent. There is no event target hierarchy. When a listener calls stopPropagation or preventDefault on an event object, it means that no more listeners after this one will be called. Same as when the listener returns false.



  • Disposable


dispatchEvent(event){boolean | undefined}

Dispatches an event and calls all listeners listening for events of this type. The event parameter can either be a string or an Object with a type property.

Name Type Description
event BaseEvent | string

Event object.

false if anyone called preventDefault on the event object or if any of the listeners returned false.