[scriptable, uuid(f39204c5-4e67-4fd0-9c70-0bd8d14e6511)]
interface jsdIValue : jsdIEphemeral

Constants

 Value is either |true| or |false|. */
const unsigned long TYPE_BOOLEAN = 0
 Value is a primitive number that is too large to fit in an integer. */
const unsigned long TYPE_DOUBLE = 1
 Value is a primitive number that fits into an integer. */
const unsigned long TYPE_INT = 2
 Value is a function. */
const unsigned long TYPE_FUNCTION = 3
 Value is |null|. */
const unsigned long TYPE_NULL = 4
 Value is an object. */
const unsigned long TYPE_OBJECT = 5
 Value is a primitive AUTF8String. */
const unsigned long TYPE_STRING = 6
 Value is void. */
const unsigned long TYPE_VOID = 7

Attributes

 Value objects.  Represents typeless JavaScript values (jsval in SpiderMonkey
 terminology.)  These are valid until the debugger is turned off.  Holding a
 jsdIValue adds a root for the underlying JavaScript value, so don't keep it
 if you don't need to.

 Internal use only. */
[noscript] readonly attribute JSDContext JSDContext
 Internal use only. */
[noscript] readonly attribute JSDValue JSDValue
 Value if interpreted as a boolean.  Converts if necessary.
readonly attribute boolean booleanValue
 Value if interpreted as a double.  Converts if necessary.
readonly attribute double doubleValue
 Value if interpreted as an integer.  Converts if necessary.
readonly attribute long intValue
 |false| unless the value is a function declared in script.
readonly attribute boolean isNative
 |true| if the value represents a number, either double or integer.
 |false| for all other values, including numbers assigned as strings
 (eg. x = "1";)
readonly attribute boolean isNumber
 |true| if the value represents a JavaScript primitive number or AUTF8String
readonly attribute boolean isPrimitive
 Class name if this value represents an object.  Empty AUTF8String if the value
 is not an object.
readonly attribute AUTF8String jsClassName
 Constructor name if this value represents an object.  Empty AUTF8String if the
 value is not an object.
readonly attribute jsdIValue jsConstructor
 Function name if this value represents a function.  Empty AUTF8String if the
 value is not a function.
readonly attribute AUTF8String jsFunctionName
 Parent value if this value represents an object, null if the value is not
 an object or the object has no parent.
readonly attribute jsdIValue jsParent
 Prototype value if this value represents an object, null if the value is
 not an object or the object has no prototype.
readonly attribute jsdIValue jsPrototype
 One of the TYPE_* values above.
readonly attribute unsigned long jsType
 Value if interpreted as an object.
readonly attribute jsdIObject objectValue
 Number of properties.  0 if the value is not an object, or the value is
 an object but has no properties.
readonly attribute long propertyCount
 Value if interpreted as a AUTF8String.  Converts if necessary.
readonly attribute AUTF8String stringValue

Methods

 Retrieves all properties if this value represents an object.  If this
 value is not an object a 0 element array is returned.
 @param propArray Array of jsdIProperty values for this value.
 @param length    Size of array.
void getProperties([array, size_is(length)] out jsdIProperty propArray, out unsigned long length)
 Retrieves a single property from the value.  Only valid if the value
 represents an object.
 @param name Name of the property to retrieve.
 @retval     jsdIProperty for the requested property name or null if no
             property exists for the requested name.
jsdIProperty getProperty(in AUTF8String name)
 When called from JavaScript, this method returns the JavaScript value
 wrapped by this jsdIValue.  The calling script is free to use the result
 as it would any other JavaScript value.
 When called from another language this method returns an xpconnect
 defined error code.
void getWrappedValue()
 jsdIValues are wrappers around JavaScript engine structures.  Much of the
 data is copied instead of shared.  The refresh method is used to resync
 the jsdIValue with the underlying structure.
void refresh()