Implementing Canvas App Events

Events provide a JavaScript-based way to send and receive events between canvas apps. Use events to enable communication between multiple canvas apps on a single page.

One scenario might be a page on which you expose two custom apps as canvas apps: a travel and expense app, and an approvals app. You can create an event so that when the status of an expense report changes, that event gets raised and contains data (in JSON format) about that expense report. The approvals canvas app subscribes to that event and specifies a function that’s called when the event is raised. When the status is changed, the approvals app receives the event and the specified function runs.

Canvas provides methods for implementing custom events in a canvas app. Full reference documentation for these methods can be found in the SDK and here.

The subscribe and unsubscribe methods can also be used to subscribe to a single Streaming API event.

Note