External JavaScript Libraries

Warning

This documentation will soon be updated Filippo Broggini


The Custom Widget SDK provides access to some external JavaScript libraries. Loading of custom scripts is currently not fully supported, but will be added in a future Squirro release.


Loaded Libraries

The following libraries are loaded by default and available in the global context in a custom widget.

LibraryVariable
jQuery

$, jQuery

or this.$() to query inside the current widget only

Bootstrap.js

 Through jQuery
Highcharts.jsHighcharts

Including Additional Libraries

Including additional libraries in a custom widget can be achieved by leveraging the customResources property:

widget.js
new Function(this.customResources['jquery-ui.js'])();

Include this snippet in your afterInitialize() method to avoid initialising the library in every widget render() call.