| Methods | Name | Owner | Returns | Description | |||||||||||||
| loadJS_XHR | Global | undefined | loadJS_XHR loads one or more Javascript objects and functions and evaluates them into Global scope (although is does not use the eval function). It uses XMLHTTPRequest to communicate with the server, and therefore requires either the XMLHTTPRequest library that form part of the AspectJS distribution set, or an alternative library that implements the API of that library's XHRWrapper type. loadJS_XHR operates synchronously. | ||||||||||||||
| loadJS_STH | Global | undefined | loadJS_STH is a stand-alone function that retrieves one or more JavaScript objects and functions, and evaluates them into Global scope by means of the 'Script-Tag Hack'. loadJS_STH operates asynchronously. | ||||||||||||||
| loadCSS | Global | undefined | loadCSS is a stand-alone function that retrieves a set of CSS style-sheet rules. It uses a variant on the 'Script Tag Hack' to accomplish this, and operates asynchronously. | ||||||||||||||
| onError | * | undefined | onError is an optional user-defined function that is called by loadJS_XHR in the event of the time-out of an XHR transaction, or in the event of an HTTP response-status other than 200. | ||||||||||||||
| Signatures | Returns | Owner | Function | Arguments... | |||||||||||||
| undefined | Global | loadJS_XHR | (URL, | XHRWrapper | [, onError]]) | ||||||||||||
| undefined | Global | loadJS_STH | (URL) | ||||||||||||||
| undefined | Global | loadCSS | (URL) | ||||||||||||||
| undefined | * | onError | (ErrorMessage) | ||||||||||||||
| Arguments | Name | Type | Denotes | Optional | Default Value | Can be Null | Can be < 1 | ||||||||||
| URL | string | URL of resource to be retrieved | No | - | No | - | |||||||||||
| XHRWrapper | XHRWrapper | XHR object with which to retrieve library | No | - | No | - | |||||||||||
| onError | function | Function to call in the event of an XHR failure | Yes | Exception-throwing function | Yes | - | |||||||||||
| ErrorMessage | string | Message generated in the event of an XHR failure | Yes | - | No | - | |||||||||||
| Exceptions | Function | Throw(s) Error Object if... | |||||||||||||||
|
loadJS_XHR onError |
XHR transaction times out - |
||||||||||||||||