Basic Setup
The Whisk Javascript SDK provides a rich set of client-side functionality that simplifies usage of the Whisk platform.
Include following code on your page:
<script
async="true"
src="https://cdn.whisk.com/sdk/shopping-list.js"
type="text/javascript"
>
</script>
<script>
var whisk = whisk || {};
whisk.queue = whisk.queue || [];
</script>
When the script is included, you will be able to use Whisk SDK functionality.
Execution queue
Since SDK is loading asynchronously there is a chance that your code will be executed before Whisk SDK is loaded. To handle this situation wrap all your Whisk SDK related code into whisk.queue.push call.
For example:
whisk.queue.push(function() {
whisk.shoppingList.viewList();
});
Last updated
Was this helpful?