Implement Property Descriptors
Relevant Sections of the Specification
- 8.6
- 8.10
Attributes of a Data Descriptor
-
Value - The value retrieved by reading the property.
-
Writable - If false, attempts by ECMAScript code to change the property‘s [[Value]] attribute using [[Put]] will not succeed.
-
Enumerable - If true, the property will be enumerated by a for-in enumeration (see 12.6.4). Otherwise, the property is said to be non-enumerable.
-
Configurable - If false, attempts to delete the property, change the property to be an accessor property, or change its attributes (other than [[Value]]) will fail.
Attributes of an Accessor Descriptor
-
Get - If the value is an Object it must be a function Object. The function‘s [[Call]] internal method (8.6.2) is called with an empty arguments list to return the property value each time a get access of the property is performed.
-
Set - If the value is an Object it must be a function Object. The function‘s [[Call]] internal method (8.6.2) is called with an arguments list containing the assigned value as its sole argument each time a set access of the property is performed. The effect of a property's [[Set]] internal method may, but is not required to, have an effect on the value returned by subsequent calls to the property's [[Get]] internal method.
-
Enumerable - If true, the property is to be enumerated by a for-in enumeration (see 12.6.4). Otherwise, the property is said to be non-enumerable.
-
Configurable - If false, attempts to delete the property, change the property to be a data property, or change its attributes will fail.
This is a very important part of implementing ECMAScript 5 and should be given priority.
I agree, this is priority #1 in the ES5 spec as it has some type of effect on pretty much everything else in the whole engine.
I will start working on this over the weekend.