fetcher-js-css

1.0.7 • Public • Published

fetcher-js-css

This library implements a perform async load of dependencies with JavaScript. It also works for stylesheets.


how to import fetcher-js-css script async


<script>
function onjs() {
		fetcher.loadScript("url", function () {
			// here you can load other script which depend of 1st one...
			console.log('JS loaded')
		});	
	}
</script>
<script async onload="onjs()" type="text/javascript" src="fetcher-js-css.js" ></script>
npm install fetcher-js-css
fetcher = require('fetcher-js-css');
fetcher.loadCSS('url to CSS',function () {
            console.log('CSS loaded')
        });
fetcher.loadCSS('url',function () {
            console.log('CSS loaded')
        });				
fetcher.loadScript("url", function () {
		console.log('JS loaded')
	});		

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.70latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.70
1.0.60
1.0.50
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i fetcher-js-css

Weekly Downloads

0

Version

1.0.7

License

Apache License 2.0

Last publish

Collaborators

  • coltbg