# 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](https://github.com/forcedotcom/salesforcecanvasframeworksdk) and [here](http://htmlpreview.github.io/?https://github.com/forcedotcom/SalesforceCanvasJavascriptSDK/blob/master/docs/index.html).

- `publish`—Creates a custom event to which other canvas apps or Visualforce pages can subscribe. See [Creating a Canvas App Event](/docs/platform/canvas-framework/guide/canvas-app-event-publish-code-example.md).
- `subscribe`—Subscribes to a parent event or custom event. This method can be used to subscribe to multiple events. See [Subscribing to a Canvas App Event](/docs/platform/canvas-framework/guide/canvas-app-event-subscribe-code-example.md).
- `unsubscribe`—Unsubscribe from a parent event or custom event. This method can be used to unsubscribe from multiple events. See [Unsubscribing from a Canvas App Event](/docs/platform/canvas-framework/guide/canvas-app-event-unsubscribe-code-example.md).

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

- **[Canvas App Events Considerations](/docs/platform/canvas-framework/guide/canvas-app-events-considerations.md)**

- **[Creating a Canvas App Event](/docs/platform/canvas-framework/guide/canvas-app-event-publish-code-example.md)**

- **[Subscribing to a Canvas App Event](/docs/platform/canvas-framework/guide/canvas-app-event-subscribe-code-example.md)**

- **[Unsubscribing from a Canvas App Event](/docs/platform/canvas-framework/guide/canvas-app-event-unsubscribe-code-example.md)**

**See Also**

- [Canvas SDK](/docs/platform/canvas-framework/guide/canvas-framework-using-sdk.md)
- [Canvas App Events Considerations](/docs/platform/canvas-framework/guide/canvas-app-events-considerations.md)
- [Using Streaming API in a Canvas App](/docs/platform/canvas-framework/guide/canvas-app-streaming-api.md)
