Protected properties using Name objects

Brandon Benvie brandon at brandonbenvie.com
Fri Jun 15 14:55:05 PDT 2012


Actually I'm working on implementing it now. I previously partially
implemented Names which is half the equation (though only in V8) and this
is just an extension to that.

There shouldn't need to be any additional checks using what I've proposed.
A non-writable property is no more writable than it currently is, and in no
different a way. Right now you can write to a non-writable property by
doing Object.defineProperty(o, k, { value: v }). This proposal uses Name
objects to make that look cleaner. It also actually adds increased
protection that doesn't exist, since it closes the defineProperty route of
modifying a read-only property entirely unless you have the key.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120615/45a9214d/attachment.html>


More information about the es-discuss mailing list