On 2010-12-23 13:53, Kevin Smith wrote: > If I might ask a side-question: what's the value in making an object > non-extensible in ES5? I understand the value of making properties > non-configurable or non-writable, but I don't yet see a reason to prevent > extensions.
Suppose that the object inherits properties from a parent on the prototype chain. Then "extending" the object could override those properties, even if they are non-configurable or non-writable on the parent. So making an object non-extensible is necessary in order to make inherited properties effectively non-configurable and/or non-writable. -- David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com
signature.asc
Description: OpenPGP digital signature
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

