Jaxer.Sandbox : Object
Return to: Jaxer Framework index

The Class describing a Sandbox: a container that can load a server-side window with its own DOM, and executes JavaScript server-side, but is more protected than the regular Jaxer server-side window.

Platform Support

Jaxer Server Framework Jaxer Client Framework
1.0 no

Constructors

Constructor Action Jaxer Server Framework Jaxer Client Framework
Jaxer.Sandbox Constructor([String url,] [String data,] [Object options]) : Jaxer.Sandbox
The constructor of a Sandbox: a container that can load a server-side window with its own DOM, and executes JavaScript server-side, but is more protected than the regular Jaxer server-side window.
Show Details 1.0 no

Jaxer.Sandbox([String url,] [String data,] [Object options]) : Jaxer.Sandbox

The constructor of a Sandbox: a container that can load a server-side window with its own DOM, and executes JavaScript server-side, but is more protected than the regular Jaxer server-side window.

Parameters
String url (optional)The url to load. If no url is give, nothing is loaded -- you can later use the load method to load it.
String data (optional)To GET a page from the url, leave this parameter undefined or pass in null. To POST to the url, set this parameter to the data to be POSTed. It may be a string (usually of the form name1=value&name2=value), or an object whose name->value property pairs will be used to construct such a string.
Object options (optional)A JavaScript object (hashmap) of name: value property pairs specifying how to load this Sandbox.

Returns
Jaxer.Sandbox Returns an instance of Jaxer.Sandbox

See Also

Jaxer.Sandbox.OpenOptions

Properties

Property Action Jaxer Server Framework Jaxer Client Framework
document : HTMLDocument
Returns the DOM document that's been loaded into this sandbox's window, or null if a url has not been loaded yet.
No Details 1.0 no
window : ChromeWindow
Returns the window that's been loaded into this sandbox, or null if a url has not been loaded yet.
No Details 1.0 no
static defaults : Jaxer.Sandbox.OpenOptions
The default OpenOptions which new calls to new Jaxer.Sandbox() or Jaxer.Web.load() will use, unless overridden by the options argument.
No Details 1.0 no

Functions

Method Action Jaxer Server Framework Jaxer Client Framework
close() : void
Closes the Sandbox's window, which terminates any async loading and removes the window and its document. This call is usually optional, since the window and its document are automatically removed at the end of the Jaxer request, and they are safely reused if you open (load) the same Sandbox more than once. It's therefore mostly useful for stopping open async requests.
No Details 1.0 no
open(String url, [String data,] [Object options]) : void
Opens the sandbox's window and document by creating them (if needed) and then loading a url into them, via a GET or POST request. You usually do not need to explicitly close() this, except to cancel async requests.
Show Details 1.0 no

Parameters
String url The url to load from
String data (optional)To GET a page from the url, leave this parameter undefined or pass in null. To POST to the url, set this parameter to the data to be POSTed. It may be a string (usually of the form name1=value&name2=value), or an object whose name->value property pairs will be used to construct such a string.
Object options (optional)A JavaScript object (hashmap) of name: value property pairs specifying how to load this Sandbox.

See Also

Jaxer.Sandbox.prototype.close

setContents(String contents, [Object options]) : void
Loads the sandbox's window and document from a string by creating them (if needed) and then loading the string into them. You do not need to explicitly close() this.
Show Details 1.0 no

Parameters
String contents The contents to load into the window, usually HTML
Object options (optional)A JavaScript object (hashmap) of name: value property pairs specifying how to load this Sandbox.

See Also

Jaxer.Sandbox.prototype.close

aptana_docs