The Jaxer namespace.
Platform Support
Jaxer Server Framework | Jaxer Client Framework | 1.0 | 1.0 |
---|
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 |
|
|||
A persistent session-like container that can store and persist name-value pairs in the context of an entire application. Whether
a given page belongs to a given application is determined by configApps.js, usually from the page's URL. All pages belonging
to an application, and their callbacks, have read/write access to this application container, regardless of user session,
and to no other application-level container.
|
No Details | 1.0 | no |
|
|||
This property exposes the current build number of the Jaxer engine
|
No Details | 1.0 | no |
|
|||
A JavaScript Object that can be used to communicate data from the server at the end of server-side page processing to the
client. When Jaxer starts to process a page server-side, Jaxer.clientData is an empty object: { } . If you set any properties
on this object, the entire object will be JSON-serialized at the end of server-side processing, and will be automatically
de-serialized when it gets to the client, so you can access your data as Jaxer.clientData in the browser. Note that if there
is no data, Jaxer.clientData will not be created at all on the client.
|
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 when Jaxer is processing a callback request, false otherwise.
|
No Details | 1.0 | no |
|
|||
True on the server side, false on the client (browser).
|
No Details | 1.0 | 1.0 |
|
|||
A persistent session-like container that can store and persist name-value pairs in the context of one page. What constitutes
a page is defined by configApps.js, usually from the page's URL (i.e. it determines which URLs constitute unique pages). A
page and its callbacks have read/write access to this page container regardless of user session, and to no other page-level
container.
|
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 |
|
|||
A persistent session container that can store and persist name-value pairs in the context of a user/browser session across
all pages of an application. What constitutes an application is defined by configApps.js, usually from the request's URL.
A page and its callbacks have read/write access to this page container regardless of user session, and to no other page-level
container.
|
No Details | 1.0 | no |
|
|||
A persistent session-like container that can store and persist name-value pairs in the context of a user/browser session on
a given page. What constitutes a page is defined by configApps.js, usually from the request's URL. A page and its callbacks
have read/write access to this sessionPage container as long as the session continues, and to no other sessionPage containers.
|
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 + "()" On the server,
|
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
|