ReadOnly (Property attribute)

An internal property attribute that controls whether a property value can be changed.

Availability:

ECMAScript edition - 2
Property/method value type:Boolean primitive

This is intended to prevent the script from modifying a property value.

You should note however that this does not mean that the property must always be ReadOnly. There may be times when the hosting environment changes the ReadOnly settings for a property.

Generally, the ReadOnly state would not change very often but the standard mandates that it does not mean constant and unchanging, only that while the ReadOnly state is true, the property should be locked out against any attempts to change its value.

Note that this is not the readOnly property that belongs to a Form Input element. That is intended to stop the user from altering the current state of an input item.

See also:DontDelete, DontEnumerate, Input.readOnly

Cross-references:

ECMA 262 edition 2 - section - 8.6.1

ECMA 262 edition 3 - section - 8.6.1