Module: Lazy

A library to load scripts on demand.
Source:

Methods

(static) basepath(file)

Resolve file path, assuming that everything is located in the same dir.
Parameters:
Name Type Description
file string Target file.
Source:

(static) domReady(callback)

A quick'n'dirty method to fire a function upon DOM readiness.
Parameters:
Name Type Description
callback function Callback function on DOM ready.
Source:

(static) extend(jsLib, module)

Load a non-modularized file that gets bound to a previously loaded module.
Parameters:
Name Type Description
jsLib string Single library (js file).
module object Module that gets extended with the s lib.
Source:

(static) load(jsLibs, callback)

Load a non-modularized file that gets exposed in the global namespace.
Parameters:
Name Type Description
jsLibs mixed Single library (js file) or array of js files.
callback function Callback function after loading the js lib.
Source:

(static) require(jsLib, callback)

Load a non-modularized file that gets bound to a given variable.
Parameters:
Name Type Description
jsLib string Single library (js file).
callback function Callback function after requiring the js lib.
Source: