Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
jsdIValue Interface Reference

Value objects. More...

import "jsdIDebuggerService.idl";

Inheritance diagram for jsdIValue:
Inheritance graph
[legend]
Collaboration diagram for jsdIValue:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void getProperties ([array, size_is(length)] out jsdIProperty propArray, out unsigned long length)
 Retrieves all properties if this value represents an object.
jsdIProperty getProperty (in string name)
 Retrieves a single property from the value.
void refresh ()
 jsdIValues are wrappers around JavaScript engine structures.
void getWrappedValue ()
 When called from JavaScript, this method returns the JavaScript value wrapped by this jsdIValue.
void invalidate ()
 Mark this instance as invalid.

Public Attributes

readonly attribute JSDContext JSDContext
 Internal use only.
readonly attribute JSDValue JSDValue
 Internal use only.
readonly attribute boolean isNative
 |false| unless the value is a function declared in script.
readonly attribute boolean isNumber
 |true| if the value represents a number, either double or integer.
readonly attribute boolean isPrimitive
 |true| if the value represents a JavaScript primitive number or string
const unsigned long TYPE_BOOLEAN = 0
 Value is either |true| or |false|.
const unsigned long TYPE_DOUBLE = 1
 Value is a primitive number that is too large to fit in an integer.
const unsigned long TYPE_INT = 2
 Value is a primitive number that fits into an integer.
const unsigned long TYPE_FUNCTION = 3
 Value is a function.
const unsigned long TYPE_NULL = 4
 Value is |null|.
const unsigned long TYPE_OBJECT = 5
 Value is an object.
const unsigned long TYPE_STRING = 6
 Value is a primitive string.
const unsigned long TYPE_VOID = 7
 Value is void.
readonly attribute unsigned long jsType
 One of the TYPE_* values above.
readonly attribute jsdIValue jsPrototype
 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 jsParent
 Parent value if this value represents an object, null if the value is not an object or the object has no parent.
readonly attribute string jsClassName
 Class name if this value represents an object.
readonly attribute jsdIValue jsConstructor
 Constructor name if this value represents an object.
readonly attribute string jsFunctionName
 Function name if this value represents a function.
readonly attribute boolean booleanValue
 Value if interpreted as a boolean.
readonly attribute double doubleValue
 Value if interpreted as a double.
readonly attribute long intValue
 Value if interpreted as an integer.
readonly attribute jsdIObject objectValue
 Value if interpreted as an object.
readonly attribute string stringValue
 Value if interpreted as a string.
readonly attribute long propertyCount
 Number of properties.
readonly attribute boolean isValid
 |true| if this object is still valid.

Detailed Description

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.

Definition at line 1018 of file jsdIDebuggerService.idl.


Member Function Documentation

void jsdIValue::getProperties ( [array, size_is(length)] out jsdIProperty  propArray,
out unsigned long  length 
)

Retrieves all properties if this value represents an object.

If this value is not an object a 0 element array is returned.

Parameters:
propArrayArray of jsdIProperty values for this value.
lengthSize of array.

Retrieves a single property from the value.

Only valid if the value represents an object.

Parameters:
nameName of the property to retrieve.
Return values:
jsdIPropertyfor the requested property name or null if no property exists for the requested 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.

Mark this instance as invalid.

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.


Member Data Documentation

Value if interpreted as a boolean.

Converts if necessary.

Definition at line 1090 of file jsdIDebuggerService.idl.

Value if interpreted as a double.

Converts if necessary.

Definition at line 1094 of file jsdIDebuggerService.idl.

Value if interpreted as an integer.

Converts if necessary.

Definition at line 1098 of file jsdIDebuggerService.idl.

|false| unless the value is a function declared in script.

Definition at line 1028 of file jsdIDebuggerService.idl.

|true| if the value represents a number, either double or integer.

|false| for all other values, including numbers assigned as strings (eg. x = "1";)

Definition at line 1034 of file jsdIDebuggerService.idl.

|true| if the value represents a JavaScript primitive number or string

Definition at line 1038 of file jsdIDebuggerService.idl.

|true| if this object is still valid.

If not, many or all of the methods and/or properties of the inheritor may no longer be callable.

Definition at line 691 of file jsdIDebuggerService.idl.

Class name if this value represents an object.

Empty string if the value is not an object.

Definition at line 1075 of file jsdIDebuggerService.idl.

Constructor name if this value represents an object.

Empty string if the value is not an object.

Definition at line 1080 of file jsdIDebuggerService.idl.

Internal use only.

Definition at line 1021 of file jsdIDebuggerService.idl.

Internal use only.

Definition at line 1023 of file jsdIDebuggerService.idl.

Function name if this value represents a function.

Empty string if the value is not a function.

Definition at line 1085 of file jsdIDebuggerService.idl.

Parent value if this value represents an object, null if the value is not an object or the object has no parent.

Definition at line 1070 of file jsdIDebuggerService.idl.

Prototype value if this value represents an object, null if the value is not an object or the object has no prototype.

Definition at line 1065 of file jsdIDebuggerService.idl.

readonly attribute unsigned long jsdIValue::jsType

One of the TYPE_* values above.

Definition at line 1060 of file jsdIDebuggerService.idl.

Value if interpreted as an object.

Definition at line 1102 of file jsdIDebuggerService.idl.

Number of properties.

0 if the value is not an object, or the value is an object but has no properties.

Definition at line 1112 of file jsdIDebuggerService.idl.

Value if interpreted as a string.

Converts if necessary.

Definition at line 1106 of file jsdIDebuggerService.idl.

Value is either |true| or |false|.

Definition at line 1041 of file jsdIDebuggerService.idl.

Value is a primitive number that is too large to fit in an integer.

Definition at line 1043 of file jsdIDebuggerService.idl.

Value is a function.

Definition at line 1047 of file jsdIDebuggerService.idl.

Value is a primitive number that fits into an integer.

Definition at line 1045 of file jsdIDebuggerService.idl.

Value is |null|.

Definition at line 1049 of file jsdIDebuggerService.idl.

Value is an object.

Definition at line 1051 of file jsdIDebuggerService.idl.

Value is a primitive string.

Definition at line 1053 of file jsdIDebuggerService.idl.

Value is void.

Definition at line 1055 of file jsdIDebuggerService.idl.


The documentation for this interface was generated from the following file: