ol/events/Target~Target
A simplified implementation of the W3C DOM Level 2 EventTarget interface. See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget.
There are two important simplifications compared to the specification:
- The handling of
useCaptureinaddEventListenerandremoveEventListener. There is no real capture model. - The handling of
stopPropagationandpreventDefaultondispatchEvent. There is no event target hierarchy. When a listener callsstopPropagationorpreventDefaulton an event object, it means that no more listeners after this one will be called. Same as when the listener returns false.
Subclasses
Extends
- Disposable
Methods
-
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
typeproperty.Name Type Description eventBaseEvent | string Event object.
Returns:
falseif anyone called preventDefault on the event object or if any of the listeners returned false.
© 2005-present, OpenLayers Contributors All rights reserved.Licensed under the BSD 2-Clause License.
https://openlayers.org/en/latest/apidoc/module-ol_events_Target-Target.html