Object.prototype.get & bye bye Object.defineProperty

Allen Wirfs-Brock allen at wirfs-brock.com
Thu Nov 29 08:02:40 PST 2012

On Nov 29, 2012, at 7:47 AM, Nathan Wall wrote:

> > Object.defineProperty(obj,key, Object.create(defaultDataProperty, {value: 123});
> Er, shouldn't that be:
> Object.defineProperty(obj,key,Object.create(null, {value: {value: 123}}));

oops, yes create requires an addition object layer
> Seems pretty excessive. It's probably too late to make defineProperty only look at own properties, but how about making it ignore properties inherited from Object.prototype?
Fairly complex to determine.  Would it really be worth it?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121129/accfd526/attachment-0001.html>

More information about the es-discuss mailing list