Object.prototype.get & bye bye Object.defineProperty

Nathan Wall nathan.wall at live.com
Thu Nov 29 07:47:38 PST 2012

> Object.defineProperty(obj,key, Object.create(defaultDataProperty, {value: 123});

Er, shouldn't that be:
Object.defineProperty(obj,key,Object.create(null, {value: {value: 123}}));
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?
In addition, it'd be nice if there was an easier way to create an object with no [[Prototype]]... some sort of addition to object literal notation? 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121129/534e5e76/attachment.html>

More information about the es-discuss mailing list