Methods
(static) addEventListener(event, callback)
- Source:
listen event
Parameters:
Name | Type | Description |
---|---|---|
event |
any | event name |
callback |
any | listen callback |
(static) emit(event, …args)
- Source:
emit an event
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
String | event name |
|
args |
any |
<repeatable> |
event params |
(static) emitWithScope(event, scope, …args)
- Source:
emit with special scope
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
any | event name |
|
scope |
any | scope |
|
args |
any |
<repeatable> |
event params |
(static) once(event, callback)
- Source:
listen only once
Parameters:
Name | Type | Description |
---|---|---|
event |
any | event name |
callback |
any | event listener callback function |
(static) removeAllListeners(event)
- Source:
remove all listeners for events
Parameters:
Name | Type | Description |
---|---|---|
event |
any | event name |
(static) removeEventListener(event, callback)
- Source:
remove special event listener by callback function
Parameters:
Name | Type | Description |
---|---|---|
event |
any | event name |
callback |
any | event listener callback function |