Contains properties and methods shared by all events for use with EventDispatcher.
Note that Event objects are often reused, so you should never rely on an event object's state outside of the call stack it was received in.
clone
Defined in
clone:218
Returns a clone of the Event instance.
a clone of the Event instance.
preventDefault
Defined in
preventDefault:175
Sets defaultPrevented to true if the event is cancelable.
Mirrors the DOM level 2 event standard. In general, cancelable events that have preventDefault() called will
cancel the default behaviour associated with the event.
remove
Defined in
remove:204
Causes the active listener to be removed via removeEventListener();
myBtn.addEventListener("click", function(evt) {
// do stuff...
evt.remove(); // removes this listener.
});
setprops
Defined in
set:227
Provides a chainable shortcut method for setting a number of properties on the instance.
props
Object
A generic object containing properties to copy to the instance.
Returns the instance the method is called on (useful for chaining calls.)
stopImmediatePropagation
Defined in
stopImmediatePropagation:194
Sets propagationStopped and immediatePropagationStopped to true. Mirrors the DOM event standard.
stopPropagation
Defined in
stopPropagation:185
Sets propagationStopped to true. Mirrors the DOM event standard.
toString
Defined in
toString:240
Returns a string representation of this object.
a string representation of the instance.
bubbles
Defined in
bubbles:105
Indicates whether the event will bubble through the display list.
Default: false
cancelable
Defined in
cancelable:114
Indicates whether the default behaviour of this event can be cancelled via preventDefault. This is set via the Event constructor.
Default: false
currentTarget
Defined in
currentTarget:80
The current target that a bubbling event is being dispatched from. For non-bubbling events, this will always be the same as target. For example, if childObj.parent = parentObj, and a bubbling event is generated from childObj, then a listener on parentObj would receive the event with target=childObj (the original target) and currentTarget=parentObj (where the listener was added).
Default: null
defaultPrevented
Defined in
defaultPrevented:133
Indicates if preventDefault has been called on this event.
Default: false
eventPhase
Defined in
eventPhase:92
For bubbling events, this indicates the current event phase:
Default: 0
immediatePropagationStopped
Defined in
immediatePropagationStopped:153
Indicates if stopImmediatePropagation has been called on this event.
Default: false
propagationStopped
Defined in
propagationStopped:143
Indicates if stopPropagation or stopImmediatePropagation has been called on this event.
Default: false
removed
Defined in
removed:163
Indicates if remove has been called on this event.
Default: false
timeStamp
Defined in
timeStamp:124
The epoch time at which this event was created.
Default: 0