© 2014, Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and or/its affiliates and/or their licensors.
Generated by JsDoc Toolkit 2.3.2

Namespace Presto

Namespace for the Presto Library Loader API.
Namespace Summary
Constructor AttributesConstructor Name and Description
 
Method Summary
Method AttributesMethod Name and Description
<static>  
Presto.Console(expose)

Allows programmatic control of browser console for debugging.

 
loadCSS(cssSrc)

Loads the CSS stylesheet specified by absolute or relative URL.

 
loadLib(libName, version, useDocWrite)

Loads the JavaScript library specified by name and optional version, handling all dependencies.

 
loadScript(scriptSrc, condition)

Loads the JavaScript library specified by absolute or relative URL.

<static>  
Presto.namespace(namespace)

Registers the specified namespace.

 
onLoadComplete(callback)

Fires when all load requests are complete.

Namespace Detail
Presto
Method Detail
<static> Presto.Console(expose)

Allows programmatic control of browser console for debugging.

Parameters:
{String} expose
The logging level to set for the console.

loadCSS(cssSrc)

Loads the CSS stylesheet specified by absolute or relative URL. Relative URLs are relative to the path to the Presto JS Library Loader.

Parameters:
{String} cssSrc
The URL to the CSS library to load.
loadLib(libName, version, useDocWrite)

Loads the JavaScript library specified by name and optional version, handling all dependencies. This JS library must be configured in libraries-config.js.

Loading can be handled on demand or by directly writing a <script> tag to the DOM based on the useDocWrite parameter. Direct writes ensure that loading is handled synchronously, in a concrete order, but must occur before the DOM is fully loaded. Loading on demand is asynchronous, providing better performance and can occur after the DOM is loaded. On demand loading, however, does not guarantee any loading order.

Parameters:
{String} libName
The configured name of the JavaScript library to load.
{String} version
Optionally, the specific version of this library to load. If omitted, the default version is loaded.
{Boolean} useDocWrite
Optionally, whether to directly write a <script> tag (true) or load this library on demand (false).
loadScript(scriptSrc, condition)

Loads the JavaScript library specified by absolute or relative URL. Relative URLs are relative to the path to the Presto JS Library Loader.

Parameters:
{String} scriptSrc
The URL to the JavaScript library to load.
{String or Function} condition
The name of an object whose presence confirms this script is loaded. This can also be a function that returns a boolean value to confirm loading.
<static> Presto.namespace(namespace)

Registers the specified namespace.

Parameters:
{String} namespace
The namespace to register.
onLoadComplete(callback)

Fires when all load requests are complete. This can occur before or after the DOM is fully loaded depending on whether loading was requested on demand. The configuration object passed to this method allows you to pass callback functions to handle successful loading or loading failures.

Parameters:
{Object} callback
A configuration object with the following properties:
{Function} callback.onSuccess
A callback function to use when loading is successful. This callback has a single scope parameter.
{Function} callback.onFailure
A callback function to use when there are loading errors. This callback has two parameters: scope, errors. The errors property contains an error message.
{Object} callback.scope
The object that defines the scope for callback methods. Typically "this".