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