Methods
# addListener(name, listener) → {object}
Add an event listener.
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
Event name |
listener |
function
|
Event handler |
The emitter instance
object
# emit(name, data)
emit a route.
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
Event name |
data |
anonym
|
Event data |
# removeListener(name, listener) → {object}
Remove a route.
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
Event name |
listener |
function
|
Event handler |
The emitter instance
object