1 Deprecated Channels
The following channels are still available for backwards compatibility, but you are discouraged from using them, as they are superseded and will eventually be phased out.
Deprecated channels |
Superseded by |
content-inserted |
tag.inserted |
content-rendered |
tag.rendered |
authentication-required |
session.authentication-required |
authenticated |
session.authenticated |
settion-set |
session.sid-set |
2 General Channels
General channels |
Description |
Arguments |
error-encountered |
When an uncaught error occures from within the library. |
GCNError |
3 Session Channels
Session channels |
Description |
Arguments |
session.authentication-required |
When an operation that requires authentication credentials (eg: PageAPI.createTag()) cannot proceed because credentials are missing. |
proceed, cancel |
session.authenticated |
When a GCN.login() call to the backend attempt is successfully authenticated. |
Server response object with the property ‘user’ that contains user the authenticated user’s data. |
session.sid-set |
Whenever the session SID is set or updated. |
Session ID string. |
4 Tag Channels
Tag channels |
Description |
Arguments |
tag.inserted |
Triggered at the point immediately after TagAPI.render() or TagAPI.edit() is invoked, |
- jQuery unit set containing the element onto which the tag was rendered.
- The rendered HTML.
|
tag.rendered |
When a tag has been rendered, either with TagAPI.render() or TagAPI.edit(). Note that when modifying the HTML, at least the root tag of the original HTML must be left untouched. |
- HTML string of rendered tag.
- The rendered Tag.
- A function that must be invoked, and that must received the (optionally) modified HTML that was passed as the first argument.
|
tag.rendered-for-editing |
When a tag is rendered for editing with TagAPI.edit(). |
Object containing the properties: - tag : The rendered tag.
- data: The raw server response data object.
- callback: The success callback that was passed to the TagAPI.edit() invocation that triggered this event.
|
tag.before-deleted |
When TagAPI.remove() is invoked, before the tag is placed in the list of tags to be deleted. |
The tag to be deleted. |
5 Page Channels
Page channels |
Description |
Arguments |
page.rendered |
When PageAPI.preview() is called. |
- HTML string of rendered page.
- The rendered Page.
- A function that must be invoked, and that must received the (optionally) modified HTML that was passed as the first argument.
|
page.before-saved |
When PageAPI.save() is called, before local changes to the object are committed to the server. |
The page to be saved. |
page.before-published |
When PageAPI.publish() is called, before request is sent to the server. |
The page to be publish. |
6 Folder Channels
Folder channels |
Description |
Arguments |
folder.before-saved |
When FolderAPI.save() is called, before local changes to the object are committed to the server. |
The folder to be saved. |