An event represents an action or state change on which the application can react. Each event has a state which further characterizes the event and – depending on its type – it can hold further information about the action.

See also:

Static methods

staticdispatch<T>(event:T):Void

Calls all event listeners that listen for this event.

See also:

staticinlinegetTypeUID(eventClass:Class<Event>):String

Return a string representation of the event type.

Event subclasses set this property via the @typeUID("event") runtime metadata, which expects the type's identifier as a String parameter. If you create your own event types, make sure that this metadata exists (also at runtime, don't use @:) and to give the event class a unique name!

Constructor

new(element:Null<Element>, state:Int)

Creates a new event for the given element with the given state. This method does not dispatch (send) the event, that happens in Event.dispatch().

See also:

Variables

finalelement:Null<Element>

The element that receives this event. If null, this event is not dispatched.

privatefinalstate:Int

Methods

getState():Int