https://github.com/hughsk/script-load
Given a URL, asynchronously load a script in the browser.
https://github.com/hughsk/script-load
Last synced: 3 months ago
JSON representation
Given a URL, asynchronously load a script in the browser.
- Host: GitHub
- URL: https://github.com/hughsk/script-load
- Owner: hughsk
- License: mit
- Created: 2013-11-03T00:12:14.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-03T02:20:09.000Z (over 11 years ago)
- Last Synced: 2025-03-14T13:47:48.667Z (4 months ago)
- Language: JavaScript
- Size: 95.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# script-load [](http://github.com/hughsk/stability-badges) #
[](https://ci.testling.com/hughsk/script-load)
Given a URL, asynchronously load a script in the browser.
## Usage ##
[](https://nodei.co/npm/script-load)
### `require('script-load')(url[, callback])` ###
Loads and runs `url`, calling `callback(err, script)` when complete: `err` is
an error if something went wrong, and `script` is the script element created
that has been loaded onto the page.## License ##
MIT. See [LICENSE.md](http://github.com/hughsk/script-load/blob/master/LICENSE.md) for details.