Event Class
Creates an homogenous object for tracking events so users can know what to expect.
Constructor
Event
-
target
-
name
-
data
Parameters:
-
target
ObjectThe target object that the event is called on
-
name
StringThe string name of the event that was triggered
-
data
ObjectArbitrary event data to pass along
Item Index
Methods
stopImmediatePropagation
()
Stops the propagation of events to sibling listeners (no longer calls any listeners).
stopPropagation
()
Stops the propagation of events up the scene graph (prevents bubbling).
Properties
data
Object
The data that was passed in with this event.
stopped
Boolean
private
Tracks the state of bubbling propagation. Do not
set this directly, instead use event.stopPropagation()
stoppedImmediate
Boolean
private
Tracks the state of sibling listener propagation. Do not
set this directly, instead use event.stopImmediatePropagation()
target
Object
The original target the event triggered on.
timeStamp
Number
The timestamp when the event occurred.
type
String
The string name of the event that this represents.