| |||||||||||||||
SummarySets the current value of an element or numeric property belonging to a specified object. | |||||||||||||||
SyntaxJSBool JS_SetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);
| |||||||||||||||
DescriptionJS_SetElement sets the current value of an element or numeric property for a specified object. If the element does not exist, this function creates it, and inherits its attributes from a like-named element in the object's prototype chain. For elements it creates, JS_SetElement sets the JSPROP_ENUMERATE attribute in the element's flags field; all other values for the property are undefined.
If you attempt to set the value for a read-only element using JavaScript 1.2 or earlier,
If you attempt to set the value for an element that does not exist, and there is a like-named read-only element in the object's prototype chain,
| |||||||||||||||
See Also
|