Utility Functions

loadScript(url: string) => Promise

When enabled, this function is exposed as window._sdiToolkit.reactor.loadScript
1
//example loading jQuery from CDN
2
var url = 'http://code.jquery.com/jquery-3.1.1.js';
3
_sdiToolkit.reactor.loadScript(url).then(function() {
4
// Do something ...
5
})
Copied!

queryString: Object<string, Function>

When enabled, this function is exposed as window._sdiToolkit.reactor.queryString
1
var parsed = _sdiToolkit.reactor.queryString.parse(location.search);
2
console.log(parsed.campaign);
3
var obj = {
4
campaign: 'Black Friday'
5
};
6
var stringified = queryString.stringify(obj);
Copied!
Last modified 2yr ago