Harmony object literals

Allen Wirfs-Brock allen at wirfs-brock.com
Mon Jun 6 11:13:25 PDT 2011


On Jun 6, 2011, at 11:04 AM, Kam Kasravi wrote:

> Yes, I did read the rational and see why you put it first, though the cleanest IMHO is
> var  o = {
>        prototype : myProto,
>        a:0,
>        b: function () {}
>   }

"prototype" is a valid property name that does not correspond to the [[Prototype]] of the the object.

Plus variants of this form do not work for specifying the [[Prototype]] of function or RegExp literals. 

Allen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110606/9f2f5808/attachment.html>


More information about the es-discuss mailing list