Using Events between a Visualforce Page and a Canvas App
Canvas provides
methods that you can use to publish and subscribe to events between your canvas app and the
parent Visualforce page. This
process includes publishing events from your Visualforce page, listening for
events on your Visualforce page,
unsubscribing from events on your Visualforce page, and resizing the
Visualforce page that contains
the canvas app. This process for resizing a canvas app differs from the process where
the canvas app resizes itself, which is described in Resizing a Canvas App. Full reference documentation for these methods can be found in the SDK and here.
- publish—Publishes an event from the Visualforce page that the canvas app can subscribe to. See Publishing a Canvas Event from a Visualforce Page.
- resize—Used by a Visualforce page to resize a canvas app iFrame. See Resizing a Canvas App in a Visualforce Page.
- subscribe—Used by a Visualforce page to subscribe to events that the canvas app might publish. See Subscribing to Events.
- unsubscribe—Used by a Visualforce page to unsubscribe to parent events that the canvas app might publish. See Unsubscribing from Events in a Visualforce Page.
<script type="text/javascript"src="https://yourDomain.my.salesforce.com/canvas/sdk/js/30.0/controller.js">