Newer Version Available

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

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/59.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.