Constructor
new EventListener(channel, fn, scope, once)
Event Listener constructor
Parameters:
Name | Type | Description |
---|---|---|
channel |
string | The channel on witch the events will be broadcast |
fn |
function | The listener callback function |
scope |
function | The listener scope |
once |
boolean | If it's a one time listener |
- Source:
Members
channel
- Source:
fn
- Source:
once
- Source:
scope
- Source:
Methods
emit(event)
Emit the event to the listener function
Parameters:
Name | Type | Description |
---|---|---|
event |
BusEvent |
- Source:
is(listener) → {boolean}
Check if the given callback is the same as the listener ones
Parameters:
Name | Type | Description |
---|---|---|
listener |
function |
- Source:
Returns:
- Type
- boolean