Event

Moduleejs.events
Namespace"ejs.events"
Definition class Event
InheritanceEvent inherit Object

The Event class encapsulates information pertaining to a system or application event.

Applications typically subclass Event to add custom event data if required. Events are initiated via the EventTarget class and are routed to listening functions via a system event queue. Example: class UpdateEvent extends Event { } obj.events.dispatch(new UpdateEvent()).


Properties

QualifiersPropertyTypeDescription
public static const PRI_HIGHNumberHigh priority constant for use with the Event() constructor method.
public static const PRI_LOWNumberLow priority constant for use with the Event() constructor method.
public static const PRI_NORMALNumberNormal priority constant for use with the Event() constructor method.
public bubblesBooleanWhether the event will bubble up to the listeners parent.
public dataObjectEvent data associated with the Event. When Events are created, the constructor optionally takes an arbitrary object data reference.
public priorityNumberEvent priority. Priorities are 0-99. Zero is the highest priority and 50 is normal. Use the priority symbolic constants PRI_LOW, PRI_NORMAL or PRI_HIGH.
public timestampDateTime the event was created. The Event constructor will automatically set the timestamp to the current time.

Event Methods

QualifiersMethod
Event(data: Object, bubbles: Boolean, priority: Number)
 Constructor for Event.
public override toString(): String

Method Detail

Event(data: Object, bubbles: Boolean, priority: Number)

Constructor for Event.

Description
Create a new Event object.
Parameters
data: Object Arbitrary object to associate with the event.
bubbles: Boolean Bubble the event to the listener's parent if true. Not currently implemented. [default: false]
priority: Number Event priority. [default: PRI_NORMAL]

override public toString(): String