Entry: JSConstDoubleSpec (Data Structure)
Summary: Describes a double value and assigns it a name.
Syntax:
struct JSConstDoubleSpec {
jsdouble dval;
const char *name;
uint8 flags;
uint8 spare[3];
};
Argument Type Description
dval jsdouble Value for the double.
name const char * Name to assign the double.
flags uint8 Attributes for the double. Currently these can be 0 or more of the following values OR'd:
JSPROP_ENUMERATE: property is visible in for loops.
JSPROP_READONLY: property is read-only.
JSPROP_PERMANENT: property cannot be deleted.
JSPROP_EXPORTED: property can be exported outside its object.
JSPROP_INDEX: property is actually an array element.
spare uint8 Reserved for future use.
Description:
JSConstDoubleSpecs is typically used to define a set of double values that are assigned as properties to an object using JS_DefineConstDoubles. JS_DefineConstDoubles creates one or more double properties for a specified object.
JS_DefineConstDoubles takes an argument that is a pointer to an array of JSConstDoubleSpecs. Each array element defines a single property name and property value to create. The last element of the array must contain zero-valued values. JS_DefineConstDoubles creates one property for each non-zero element in the array.
See also:
|
|
|