Message bus for application.
Methods
(static) off(eventName, windowopt, listener)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
eventName |
String
|
the event to remove listener from |
|
window |
Window
|
<optional> |
the window to listen to events from (if null, listens to all windows) |
listener |
function
|
the callback function to call when event is triggered for this window |
(static) on(eventName, windowopt, listener)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
eventName |
String
|
the event to listen to |
|
window |
Window
|
<optional> |
the window to listen to events from (if null, listens to all windows) |
listener |
function
|
the callback function to call when event is triggered for this window |
(static) send(eventName, windowopt, …args)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
eventName |
String
|
the event to send to |
|
window |
Window
|
<optional> |
the target window to send to (if not specified, sends to all windows) |
args |
*
|
<repeatable> |
Arguments to send to listeners |