https://github.com/lasso-js/lasso-loader
Module to support lazy loading of JavaScript and CSS resources
https://github.com/lasso-js/lasso-loader
Last synced: 3 months ago
JSON representation
Module to support lazy loading of JavaScript and CSS resources
- Host: GitHub
- URL: https://github.com/lasso-js/lasso-loader
- Owner: lasso-js
- Created: 2014-03-13T03:26:50.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-11-02T23:41:06.000Z (about 9 years ago)
- Last Synced: 2025-06-22T14:42:27.845Z (5 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 2
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
lasso-loader
============
This module provides functionality to asynchronously load JavaScript and CSS resources in any web browser. It's used by Lasso.js to support lazily loading resources, but it can also be used independently of Lasso.js.
NOTE: All resources are loaded in parallel.
# Usage
```javascript
var lassoLoader = require('lasso-loader');
lassoLoader.load({
js: [
'http://foo.com/static/foo.js',
'http://foo.com/static/bar.js'
],
css: [
'http://foo.com/static/foo.css',
'http://foo.com/static/bar.css'
]
},
function(err) {
if (err) {
// Something went wrong
} else {
// All resources successfully loaded!
}
});
```