Linux Mac OSX Windows

  
[scriptable, uuid(a2dd25a4-1dd1-11b2-bda6-ed525acd4c35)]
interface jsdIContext : jsdIEphemeral

Constants

 OPT_* values must be kept in sync with JSOPTION_* #defines in jsapi.h.


 Strict mode is on.
const long OPT_STRICT = 1
 Warnings reported as errors.
const long OPT_WERR = 2
 Makes eval() use the last object on its 'obj' param's scope chain as the
 ECMA 'variables object'.
const long OPT_VAROBJFIX = 4
 Private data for this object is an nsISupports object.  Attempting to
 alter this bit will result in an NS_ERROR_ILLEGAL_VALUE.
const long OPT_ISUPPORTS = 8

Attributes

 Top of the scope chain for this context.
readonly attribute jsdIValue globalObject
 Context object.  Only context's which are also nsISupports objects can be
 reflected by this interface.
[noscript] readonly attribute JSContext JSContext
 OPT_* values above, OR'd together.
attribute unsigned long options
 Private data for this context, if it is an nsISupports, |null| otherwise.
readonly attribute nsISupports privateData
 |true| if this context should be allowed to run scripts, |false|
 otherwise.  This attribute is only valid for contexts which implement
 nsIScriptContext.  Setting or getting this attribute on any other
 context will throw a NS_ERROR_NO_INTERFACE exception.
attribute boolean scriptsEnabled
 Unique tag among all valid jsdIContext objects, useful as a hash key.
readonly attribute unsigned long tag
 Last version set on this context.
 Scripts typically select this with the "language" attribute.
 See the VERSION_* consts on jsdIDebuggerService.
attribute long version
 Retrieve the underlying context wrapped by this jsdIContext.
readonly attribute nsISupports wrappedContext