Newer Version Available

This content describes an older version of this product. View Latest

Using Events between a Visualforce Page and a Canvas App

Force.com 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. The Controller.js object is needed for the Visualforce page to use these methods. Your script in the Visualforce page might look something like this:
1<script type="text/javascript"src="https://na1.salesforce.com/canvas/sdk/js/30.0/controller.js">