Function zenario.loadLibrary()

In JavaScript:
zenario.loadLibrary(
path, callback, alreadyLoaded, stylesheet
)

Description

This can be used to load a JavaScript library, if it is not already on the page.

The format/behaviour is very similar to the ze::requireJsLib() function in PHP.

Parameters

path

The URL to the .js file.

If the URL is a relative URL (or matches the URLBasePath), the zenarioCSSJSVersionNumber will be automatically added to the end as a cache-killer, if not already there.

callback

A function to call when the library is loaded.

alreadyLoaded

Set this to true if the library has already been loaded, and you just want to flag this in the system.

stylesheet

Optional, the URL for a stylesheet that the library needs to be loaded.