JSPM

loading-script

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q19760F
  • License MIT

Load JavaScript dynamically into the browser

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

master MIT License

Installing

Using npm:

$ npm install loading-script

Using 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')
});

License

MIT