@wmakeev/load-script
v1.0.0
Published
Client script loader with promises
Downloads
2
Readme
script-loader
Simple client script loader
API
loadScript(url, [name]) : Promise
url
- script url to loadname
- script global name (loadScript skip script loading if window[name] defined)
Usage
loadScript('https://path.to/scritp.js', 'script')
.then(function () {
script.doWork();
})
.catch(function (e) {
console.error(e);
})