Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

JSConstDoubleSpec

This article covers features introduced in SpiderMonkey 17

Describes a double and integer value and assigns it a name.

Syntax

template<typename T>
struct JSConstScalarSpec {
    const char *name;
    T val;
/*
    uint8_t         flags;    // Obsolete from JSAPI 35
    uint8_t         spare[3]; // Obsolete from JSAPI 35
*/
};

typedef JSConstScalarSpec<double> JSConstDoubleSpec;
typedef JSConstScalarSpec<int32_t> JSConstIntegerSpec; // Added in SpiderMonkey 38
Name Type Description
val double or int32_t Value for the double or integer.
name const char * Name to assign the double.
flags uint8_t Property attributes for the double. Obsolete since JSAPI 35
Currently these can be 0 or more of the following values OR'd:

If this field is 0, JS_DefineConstDoubles uses the default attributes JSPROP_READONLY | JSPROP_PERMANENT instead.

spare uint8_t [3] Reserved for future use. Obsolete since JSAPI 35

Description

JSConstDoubleSpecs is used to define a set of double values that are assigned as properties to an object using JS_DefineConstDoubles.

JSConstIntegerSpecs is used to define a set of double values that are assigned as properties to an object using JS_DefineConstIntegers.

See Also

Document Tags and Contributors

 Contributors to this page: arai, fscholz, Jorend, Nickolay, MMondor, Callek, Dria
 Last updated by: arai,