Package Exports
- loading-script
- loading-script/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (loading-script) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Loading-Script
Dynamic Loading JavaScript
Installing
Using npm:
$ npm install loading-scriptUsing jsDelivr CDN:
<script src="https://cdn.jsdelivr.net/npm/loading-script/dist/loading-script.js"></script>Using unpkg CDN:
<script src="https://unpkg.com/loading-script/dist/loading-script.js"></script>Example Usage
Node.js
const {getScript} = require("loading-script");
getScript('test.js', function(){
console.log('onload')
});Browser
<script src="https://cdn.jsdelivr.net/npm/loading-script/dist/loading-script.js"></script>
getScript('test.js', function(){
console.log('onload')
});