-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
68e3c84
commit 21e6b0f
Showing
3 changed files
with
164 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
API:channel object interface | ||
============================ | ||
|
||
channel.getName() | ||
----------------- | ||
Returns the name of this channel. | ||
|
||
* public | ||
* type: function | ||
* returns: string | ||
|
||
channel.setCurrentWindowAsMaster() | ||
---------------------------------- | ||
Makes current window/tab as master in this channel. | ||
|
||
* public | ||
* type: function | ||
* returns: boolean | ||
|
||
channel.currentWindowIsMaster() | ||
------------------------------- | ||
Checks the master state of this channel. | ||
|
||
* public | ||
* type: function | ||
* returns: boolean | ||
|
||
channel.broadcast(trigger:string[, arguments:arguments]) | ||
-------------------------------------------------------- | ||
Emits broadcasting. Hint: only master can sends broadcast. | ||
|
||
* public | ||
* type: function | ||
|
||
channel.emit(trigger:string[, arguments:arguments]) | ||
--------------------------------------------------- | ||
Alias of **channel.broadcast** | ||
|
||
channel.executeTrigger(triggerDetails:object[, force:boolean]) | ||
-------------------------------------------------------------- | ||
Executes pointed trigger. **triggerDetails** contains **name:string** and **args:array** | ||
|
||
* public | ||
* type: function | ||
* throws error if triggerDetails is not an instance of Object | ||
|
||
channel.on(trigger:string, callback:function) | ||
--------------------------------------------- | ||
Attaches callback to trigger event. | ||
|
||
* public | ||
* type: function | ||
|
||
channel.once(trigger:string, callback:function) | ||
----------------------------------------------- | ||
Attaches callback to trigger event only for one time. | ||
|
||
* public | ||
* type: function | ||
|
||
channel.off(trigger:string) | ||
--------------------------- | ||
Detaches callback from trigger event (destroys trigger). | ||
|
||
* public | ||
* type: function | ||
|
||
channel._triggers | ||
----------------- | ||
Contains triggers of this channel. | ||
|
||
* private | ||
* type: object | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ User Documentation | |
|
||
getting_started | ||
api | ||
channel_api | ||
|