Emitter
The Emitter is a simple emitter class that provides you with on()
, off()
and trigger()
methods
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
callbacks: {} |
Method Summary
Public Methods | ||
public |
Unregisters callbacks by event name |
|
public |
Registers callbacks by event name |
|
public |
trigger(event: AbstractEvent): * Triggers event callbacks by event object |
Public Constructors
public constructor() source
Public Members
public callbacks: {} source
Public Methods
public off(type: String, callback: Function): * source
Unregisters callbacks by event name
Return:
* |
public on(type: String, callbacks: ...Function): * source
Registers callbacks by event name
Return:
* |
public trigger(event: AbstractEvent): * source
Triggers event callbacks by event object
Params:
Name | Type | Attribute | Description |
event | AbstractEvent |
Return:
* |