In 8.12.9 [[DefineOwnProperty]]

Step 10.a.i:

"Reject, if the [[Writable]] field of current is false and the [[Writable]]
field of Desc is true."

This specifically allows making a non-configurable writable property read
only.

For example:

var obj = {};
Object.defineOwnProperty(obj, 'p', {value: 'foo', writable: true:,
configurable: false});
Object.defineOwnProperty(obj, 'p', {writable: false});

The spec explicitly allows the second call to succeed. Is that intentional?
If so, what was the rationale?

Allowing changes to the value of the writable flag on the property violates
my intuition for configurable:false.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to