Create multiple constant double-valued properties on an object.
JSBool JS_DefineConstDoubles(JSContext *cx, JSObject *obj, JSConstDoubleSpec *cds);
||The context in which to define the new properties.
Requires request. In a
||Object for which to create new properties.|
||Pointer to an array of
JS_DefineConstDoubles creates one or more properties for a specified object,
obj, where each property consists of a double value. Each property is automatically assigned attributes as specified in the
flags field of the
JSConstDoubleSpec structure pointed to by
flags is set to
0, the attributes for the property are automatically set to
JSPROP_PERMANENT | JSPROP_READONLY.
cds is a pointer to the first element of an array of
JSConstDoubleSpec structures. Each array element defines a single property name and property value to create. The
name field of the last element of the array must contain
JS_DefineConstDoubles creates one property for each element in the array what contains a non-zero name field.
JS_TRUE, indicating it has created all properties listed in the array. Otherwise it returns