Jaxer.Sandbox.OpenOptions : Object
Return to: Jaxer Framework index

Options used to define the behavior of Jaxer.Sandbox opening.

Platform Support

Jaxer Server Framework Jaxer Client Framework
1.0 no

Constructors

Constructor Action Jaxer Server Framework Jaxer Client Framework
Jaxer.Sandbox.OpenOptions Constructor() : Jaxer.Sandbox.OpenOptions
Options used to define the behavior of Jaxer.Sandbox loading. Create a new Jaxer.Sandbox loading() to get the default options, then modify its properties as needed before passing it to new Jaxer.Sandbox() or to load() on an instance of Jaxer.Sandbox.
Show Details 1.0 no

Jaxer.Sandbox.OpenOptions() : Jaxer.Sandbox.OpenOptions

Options used to define the behavior of Jaxer.Sandbox loading. Create a new Jaxer.Sandbox loading() to get the default options, then modify its properties as needed before passing it to new Jaxer.Sandbox() or to load() on an instance of Jaxer.Sandbox.

Returns
Jaxer.Sandbox.OpenOptions Returns an instance of OpenOptions.

Properties

Property Action Jaxer Server Framework Jaxer Client Framework
allowJavaScript : Boolean
Whether to allow (server-side) execution of JavaScript, if any, within the loaded page. By default, this is true. This applies to JavaScript in the page inside this Sandbox instance, not the JavaScript of the loading page. Note that the JavaScript inside this Sandbox instance in any case does not have access to the Jaxer framework, and is running without the usual Jaxer server-side privileges.
No Details 1.0 no
allowMetaRedirects : Boolean
Whether to allow refresh-based redirects within the loaded page. By default, this is true;
No Details 1.0 no
allowSubFrames : Boolean
Whether to allow the loaded page to itself load frames or iframes. By default, this is true.
No Details 1.0 no
async : Boolean
Set to true for asynchronous, false for synchronous (default). To use it asynchronously, see also Jaxer.Thread.waitFor.
Show Details 1.0 no
See Also

Jaxer.Thread.waitFor

headers : Object
Add name-value pairs to this object to set headers on the http request. Both the name and the value should be strings. For POST requests, a 'Content-Type' header with value "application/x-www-form-urlencoded" will be added automatically unless you specify a different one, and a 'Content-Length' header with the appropriate value will also be set.
No Details 1.0 no
onload : Function
The value of this, if any, will be used as the Sandbox's onload handler. The onload handler will be called after the page is loaded, and after the page's own onload is invoked, if any. It's particularly useful when the page is loaded asynchronously, in which case it may be used in conjunction with the Sandbox's waitForCompletion method or with Jaxer.Thread.waitFor.
Show Details 1.0 no
See Also

Jaxer.Sandbox.prototype.waitForCompletion|Jaxer.Thread.waitFor

onlocationchange : Function
Set this to an event handler function you want called if the document in the Sandbox redirects (changes its location). This will happen whether the redirect is due to an HTTP status code or header (e.g. the web server returned a 307 Temporary Redirect and a Location header), or it is in the HTML either as a meta element with a HTTP-Equiv attribute or a JavaScript action (e.g. window.location = ...).

The function will be called with two arguments:
  1. the new url to which the location would be changed,
  2. and a boolean flag that will be true if it's an HTTP status+location redirect and false if it's a location change due to HTML or JavaScript.


If the function returns a true, the redirection is allowed; if it returns a false the location is not changed.
No Details 1.0 no
onsslcerterror : Function
Set to a custom callback function to call if an SSL request fails due to a certificate error.

The function will be called with the following arguments:
  1. the certInfo (an object containing properties describing the certificate and its status),
  2. the cert (certificate) itself (an object containing properties describing the certificate and its status),
  3. the XHR's socketInfo
  4. the XHR's sslStatus
  5. the XHR's targetSite


It should return true to ignore the error, or false to abort the request. This is only available server-side. If (and only if) this is set to a function that returns true, information about the failure can be retrieved from the extended response's certInfo property.
No Details 1.0 no
aptana_docs