|
Summary
Flag that indicates a property is read only.
|
Syntax
JSPROP_READONLY
|
Description
JSPROP_READONLY is a flag value that indicates that the value for a property belonging to a JS object cannot be set at run time. For JavaScript 1.2 and lower, it is an error to attempt to assign a value to a property marked with the JSPROP_READONLY flag. In JavaScript 1.3 and ECMA-Script, attempts to set a value on a read-only property are ignored. You can, however, always check the flags fields to determine if a property is read only.
|
Notes
Property flags cannot be changed at run time. Instead, you either pass a set of
flags as an argument to JS_DefineProperty to create a single property with
fixed flag values, or you set property flags in a JSPropertySpec struct which is
then passed to the JS_DefineProperties function to create multiple
properties on a single object.
|
See Also
|