Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughsk/script-load
Given a URL, asynchronously load a script in the browser.
https://github.com/hughsk/script-load
Last synced: 8 days 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 (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-03T02:20:09.000Z (about 11 years ago)
- Last Synced: 2024-10-17T16:41:21.627Z (22 days ago)
- Language: JavaScript
- Size: 95.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# script-load [![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
[![browser support](https://ci.testling.com/hughsk/script-load.png)](https://ci.testling.com/hughsk/script-load)
Given a URL, asynchronously load a script in the browser.
## Usage ##
[![script-load](https://nodei.co/npm/script-load.png?mini=true)](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.