File: ../../Developer.FoundationDotJS.org/wwwroot/Foundation.js

Foundation
Class ClientLoader

Object
  
 
 
Foundation.ClientLoader

All Implemented Interfaces:

Class, Elemental, Resourceful


Foundation.ClientLoader

implements Foundation.Class, Foundation.Elemental, Foundation.Resourceful

A featherweight class to load and invoke other classes. See the Foundation.ClientLoader home page for more information.


Constructor Summary
Foundation.ClientLoader()

Field Summary
Booleandebug
A flag to show the response from the script list request.
ObjectparameterStore
An object to store information between the requestScriptList and readyToProcess calls.
static ObjectresourcePack
Override to add URLs for script list requests.

Fields inherited from Foundation.Elemental
$Foundation_$registry_index

Method Summary
Booleanabort()
Aborts the loading of scripts.
 dispose()
voidreadyToProcess()
Called when all scripts are loaded. Override or assign to another method for final processing with loaded classes.
voidreceiveScriptList(/*Array*/ scripts)
Called when the loader receives the script list from the server.
 requestScriptList(/*String*/ resourceKey, /*String*/ parameters)
Begins the request for the script list.

Methods inherited from Foundation.Class
getTypePath, isInstanceOf

Methods inherited from Foundation.Elemental
attachEvent, detachEvent, elementId, event, getById, getElement, getElementValue, getElements, getFirst, getNext, parseElementId, processHtml, processHtml

Methods inherited from Foundation.Resourceful
resource, resource, resourceUrl, resourceUrl

Constructor Detail

ClientLoader

Foundation.ClientLoader()

Field Detail

debug

Boolean debug

A flag to show the response from the script list request.


parameterStore

Object parameterStore

An object to store information between the requestScriptList and readyToProcess calls.


resourcePack

static Object resourcePack

Override to add URLs for script list requests.

Method Detail

abort

Boolean abort()

Aborts the loading of scripts.

Returns:
true if the loader was in the process of loading scripts.

dispose

dispose()
Overrides:
dispose in class Class

readyToProcess

void readyToProcess()

Called when all scripts are loaded. Override or assign to another method for final processing with loaded classes.


receiveScriptList

void receiveScriptList(/*Array*/ scripts)

Called when the loader receives the script list from the server.

Parameters:
scripts - 
An array of conditions and urls. The script list is in the form of [test:"ConditionExpression", src:"ScriptUrl.js" | execute:"Expression",...]. For each script, test is evaled, and if the ConditionExpression is true, either the execute will get evaled or the script at src URL will be requested and loaded.

requestScriptList

requestScriptList(/*String*/ resourceKey,
                  /*String*/ parameters)

Begins the request for the script list.

Parameters:
resourceKey - 
The resource key of the url in the resourcePack.
parameters - 
(Optional) Additional query string parameters to add to the script list request URL.