Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Referencing the Canvas SDK

The Canvas SDK is available on GitHub, and you have two options for referencing it from your canvas app.
  • Host the SDK on your own Web server and access it there
  • Access the SDK hosted on the Salesforce server
For example, here’s what the include statement looks like if you host the SDK on your own Web server:
1<script type="text/javascript" src="/sdk/js/canvas-all.js"></script>
Here’s what the include statement looks like if you reference the hosted SDK:
1<script type="text/javascript" src="https://<instance>.salesforce.com/canvas/sdk/js/67.0/canvas-all.js"></script>

The ability to reference the SDK on the Salesforce server is useful when you want to include one of the SDK files in a Web app or from a Visualforce page.