Jaxer.Includer : Object
Return to: Jaxer Framework index

Namespace object holding functions and members used to get and include HTML and JavaScript from external sources.

Platform Support

Jaxer Server Framework Jaxer Client Framework
1.0 no

Functions

Method Action Jaxer Server Framework Jaxer Client Framework
static compile(String contents, [Object global,] [String effectiveUrl]) : String
Compile the given JavaScript string in the given global context

(Advanced)
Show Details 1.0 no

Parameters
String contents The string of script code to compile
Object global (optional)An optional global context (usually a window object) in which to compile it
String effectiveUrl (optional)An optional parameter to indicate (e.g. in error messages) the effective URL from which this code originates.

Returns
String The compiled bytecode, as a string.

static evalCompiledOn(String contents, [Object global]) : Object
Evaluate the given JavaScript bytecode string in the given global context

(Advanced)
Show Details 1.0 no

Parameters
String contents The string of script code to evaluate
Object global (optional)An optional global context (usually a window object) in which to evaluate it

Returns
Object The result of the last JavaScript expression evaluated.

static evalOn(String contents, [Object global,] [String effectiveUrl]) : Object
Evaluate the given JavaScript string in the given global context

(Advanced)
Show Details 1.0 no

Parameters
String contents The string of script code to evaluate
Object global (optional)An optional global context (usually a window object) in which to evaluate it
String effectiveUrl (optional)An optional parameter to indicate (e.g. in error messages) the effective URL from which this code originates.

Returns
Object The result of the last JavaScript expression evaluated.

static load(String src, [Object global,] [String runat,] [Boolean useCache,] [Boolean forceCacheRefresh,] [Boolean dontSetRunat]) : Object
Loads and evaluates a JavaScript file on the given global execution object with the given runat attribute.
Show Details 1.0 no

Parameters
String src The URL from which the JavaScript file should be retrieved. If the src is an absolute file://... URL then it is retrieved directly from the file system, otherwise it is retrieved via a web request.
Object global (optional)The global (usually a window object) on which to evaluate it. By default, it is the same global as the one in which the calling function is executing.
String runat (optional)The value of the effective runat "attribute" to use when evaluating this code. By default, it uses the same runat attribute as the last evaluated script block.
Boolean useCache (optional)If true, the file is loaded from a cached compiled version if available, and if not available the file's contents are fetched, compiled and cached. By default this is false.
Boolean forceCacheRefresh (optional)If true, force loading from src even if found in cache. The loaded contents will then be cached. By default this is false.
Boolean dontSetRunat (optional)If true, any functions created in this script block will not have a runat property set on them, not even the default runat of the last script block. By default this is false.

Returns
Object The result of the last JavaScript expression evaluated, if any.

aptana_docs