The Jaxer namespace.
Platform Support
| Jaxer Server Framework | Jaxer Client Framework | 1.0 | 1.0 |
|---|
Classes
Properties
![]() |
|||
| Property | Action | Jaxer Server Framework | Jaxer Client Framework |
|---|---|---|---|
|
The value of the runat attribute of the last script block encountered.
(Advanced) |
No Details | 1.0 | no |
|
|||
|
This is the global execution context for JavaScript code you define in (or load into) a page on the server. It's aliased as
window in the page, so it behaves just like the window global object on the client (browser).
(Advanced) |
No Details | 1.0 | no |
|
|||
|
This property exposes the current build number of the Jaxer engine
|
No Details | 1.0 | no |
|
|
|||
|
This gives read-only access to the Jaxer Core's preferences, each of which become a property on this object.
|
No Details | 1.0 | no |
|
|
|||
|
If Jaxer.Config.EMBEDDED_CLIENT_FRAMEWORK_SRC has been set, it's assumed to be the path to the embeddable (and usually compressed)
version of the Jaxer client-side framework. This file is read once at server startup and kept in memory, to be embedded in
pages that may require it. You can change this behavior using Jaxer.Response.prototype.setClientFramework.
|
No Details | 1.0 | no |
|
|
|||
|
True on the server side, false on the client (browser).
|
No Details | 1.0 | 1.0 |
|
|
|||
|
This starts out as null at the start of every request. If you set it to true, handlers for the onload event registered via
addEventListener or window.onload will be called, regardless of Jaxer.Config.ONLOAD_ENABLED; if you set it to false, they
will not be called, regardless of Jaxer.Config.ONLOAD_ENABLED. Thus, it is used to override Jaxer.Config.ONLOAD_ENABLED for
the current request.
|
No Details | 1.0 | no |
|
|
|||
|
Adding functions (or their names) to this array is equivalent to setting their proxy property to true. To enforce no proxies,
overriding any proxy property or runat="server-proxy", set Jaxer.proxies = null.
|
No Details | 1.0 | no |
|
|
|||
|
Contains information and methods about the current request
|
No Details | 1.0 | no |
|
|
|||
|
Contains information and methods about how to respond to the current request
|
No Details | 1.0 | no |
|
|
|||
|
If Jaxer.Config.RESPONSE_ERROR_PAGE has been set, it's assumed to be the path to a file containing the error page to return
when an error has occurred during the response. This file is read once at server startup and kept in memory, to be returned
as required. If Config.RESPONSE_ERROR_PAGE is not set, a default HTML string is used. You can change the behavior of the framework
when it encounters errors serving requests using Jaxer.Config.DISPLAY_ERRORS.
|
No Details | 1.0 | no |
|
|
|||
Functions
![]() |
||||||||||||
| Method | Action | Jaxer Server Framework | Jaxer Client Framework | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
static include(String url, [Object global]) :
void
Loads and evaluates JavaScript from the given location against the given global execution context. This is a low-level wrapper
around "@mozilla.org/moz/jssubscript-loader;1" and mozIJSSubScriptLoader.loadSubScript. It's best to use the higher-level
Jaxer.Includer.load(src, global, runat) which is also conveniently available as Jaxer.load(src, global, runat) inside any
Jaxer server-side page (where global is defaulted to window).
(Advanced) |
Show Details | 1.0 | no | |||||||||
|
Parameters
|
||||||||||||
|
static notifyFatal(Object error) :
void
Notifies the framework that a fatal error has occurred, one which will require fixing and restarting Jaxer. How this is handled
is then determined by the Jaxer.Config settings.
(Advanced) |
Show Details | 1.0 | no | |||||||||
|
Parameters
|
||||||||||||
|
static load(String src, [Object global,] [String runat]) :
void
Loads a JavaScript file and evaluates it.
|
Show Details | 1.0 | no | |||||||||
|
Parameters
|
||||||||||||
|
Loads all extensions from the folder defined in Config.EXTENSIONS_DIR.
|
No Details | 1.0 | no | |||||||||
|
|
||||||||||||
|
static loadExtension(String name, Object namespaceObject) :
void
Loads a framework extension (already defined in memory). If the namespaceObject defines an onLoad method, it will be called
(without arguments)
|
Show Details | 1.0 | no | |||||||||
|
Parameters
|
||||||||||||
|
Holds the proxy functions for calling server functions that were designated with runat="both-proxy" (or equivalent), to prevent
function name collisions. So e.g. if a function getName() is defined with runat="both-proxy", in the browser you can call
getName() to use the client-side function or Jaxer.Server.getName() to use the server-side function. Jaxer.Server holds both
the synchronous and asynchronous versions of the proxies (e.g. Jaxer.Server.getName() and Jaxer.Server.getName.async()).
|
No Details | no | 1.0 | |||||||||
|
|
||||||||||||
|
static setEvent(Object domElement, String eventName, Object handler) :
void
Used to set events on DOM elements such that they "do the right thing" both client-side and server-side. On the client, this
acts as expected, setting a property with the name eventName (e.g. onclick) on the DOM element. On the server, the eventName
attribute is set on the DOM element so it can be serialized with the DOM before sending to the client. If the handler is a
(server side) function with a name, the attribute's value is handler.name + "()".
|
Show Details | 1.0 | 1.0 | |||||||||
|
Parameters
|
||||||||||||
|
static setTitle(String title) :
void
Sets the title of the document and works on either the server or the client.
|
Show Details | 1.0 | 1.0 | |||||||||
|
Parameters
|
||||||||||||
|
static unloadExtension(String name, Boolean noWarnings) :
void
Unloads a previously-loaded framework extension. If its namespaceObject defines an onUnload method, it will be called (without
arguments)
|
Show Details | 1.0 | no | |||||||||
|
Parameters
|
||||||||||||

