Readdition of __proto__

Andrea Giammarchi andrea.giammarchi at gmail.com
Mon Oct 14 13:53:02 PDT 2013


Then I might have confused what decided with `JSON` serialization where
`"__proto__"` will be a property and not a setter, neither a getter once
deserialized.

Is this correct? Yeah, I remember that different accessors looked weird to
me too ... thanks for clarification.

Best Regards


On Mon, Oct 14, 2013 at 1:43 PM, Brendan Eich <brendan at mozilla.com> wrote:

> Andrea Giammarchi <mailto:andrea.giammarchi@**gmail.com<andrea.giammarchi at gmail.com>
>> >
>> October 14, 2013 1:32 PM
>>
>> I meant that IIRC `obj["__proto__"]` should not invoke that Annex B
>> specified getter (@Benjamin, Annex B is where you'll find everything
>> related indeed) but `obj.__proto__` will ... unless once again I've missed
>> some update.
>>
>
> What you just wrote is not true of __proto__ in SpiderMonkey or other
> engines I can test (V8, JSC).
>
> It also can't be true via ES6 Annex B, since obj[key] and obj.foo where
> key = 'foo' both lookup prototype properties and will find
> Object.prototype.foo.
>
> /be
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131014/35ffe599/attachment-0001.html>


More information about the es-discuss mailing list