Dispatcher
| Module | ejs.events |
| Namespace | "ejs.events" |
| Definition | class Dispatcher |
| Inheritance | Dispatcher Object |
The Dispatcher class supports the registration of listeners who want notification of events of interest.
Properties
| Qualifiers | Property | Type | Description |
|---|---|---|---|
| internal-23 | events | Object |
Dispatcher Methods
| Qualifiers | Method |
|---|---|
| public | addListener(callback: Function, eventType: Type): 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): 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.
Dispatcher()
Construct a new event Dispatcher object.