Dispatcher
Module | ejs.events |
Definition | class Dispatcher |
Inheritance | Dispatcher ![]() |
The Dispatcher class supports the registration of listeners who want notification of events of interest.
WARNING: This class is prototype and it not currently supported.
Properties
Qualifiers | Property | Type | Description |
---|---|---|---|
No properties defined |
Dispatcher Methods
Qualifiers | Method |
---|---|
public | addListener(callback: Function, eventType: Type = Event): Void |
Add a listener function for events. | |
public | dispatch(event: Event): Void |
Dispatch an event to the registered listeners. | |
Dispatcher() | |
Construct a new event Dispatcher object. | |
public | removeListener(callback: Function, eventType: Type = Event): Void |
Remove a registered listener. |
Method Detail
Dispatch an event to the registered listeners.
- Description
- This is called by the class owning the event dispatcher.
- Parameters
event: Event Event instance to send to the listeners.
public Dispatcher()
Construct a new event Dispatcher object.