Readdition of __proto__

Andrea Giammarchi andrea.giammarchi at gmail.com
Wed Oct 16 10:10:05 PDT 2013


yeah, if you use an alias L the footgun image comes upside down too

```
L.__proto__ = null;

// later on, in ES6

L.__proto__ => () pew, pew;

```








On Tue, Oct 15, 2013 at 11:01 PM, Brendan Eich <brendan at mozilla.com> wrote:

> Allen Wirfs-Brock wrote:
>
>> On Oct 15, 2013, at 3:19 PM, Dean Landolt wrote:
>>
>>> >  >  So just to be clear, the only way to add a __proto__ property to
>>> an existing object is with Object.defineProperty?
>>> >
>>>
>>
>> Object.mixin(obj, {["__proto__"]:42});
>>
>> Allen
>>
>
> Don't forget this chestnut:
>
>
> js> var o = {}
> js> o.__proto__ = null
> null
> js> o.__proto__ = 42
> 42
> js> o.toString
> js>
>
> /be
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131016/40c89938/attachment.html>


More information about the es-discuss mailing list