class EventDispatcher
Package :
(default package)
Known subclasses :
Description :
An object which can be listened to. Custom event types can be used.
Methods :
new()
Creates a new EventDispatcher object.
addEventListener(eventType, closure)
Adds a function to call whenever the specified event will occur.
Parameters :
- eventType : The event type to listen. Types can be found in Events.
- closure : The function to call.
dispatchEvent(eventType, event)
Dispatching the specified event
Parameters :
- eventType : The event type that should be dispatched.
- event : The Event object (optional).
removeEventListener(eventType, closure)
Removing an event listener for the specified event type
Parameters :
- eventType : The event type to listen. Types can be found in Events.
- closure : The function to remove.