Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

dmitry-dedukhin/jsLoader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Async JS loader

Helps to organize your code in modules and load them asynchronously.

Some examples goes here.

Execute code after modules test1 and test2 load:

jsLoader.require('test1', 'test2', function() {
    log('EXECUTED: inline script waiting for test1 && test2');
});

Execute code after domready event and module test2 load:

jsLoader.require('domready', 'test2', function() {
    log('EXECUTED: inline script waiting for domready && test2');
});

Execute code after domready event:

jsLoader.domready(function() { // or jsLoader.require('domready', function() {
    log('DOM ready');
});

Preload script:

jsLoader.load(['test3']);

See full example here.

About

Async JS load with dependencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published