Brendan Eich (2013-10-16T06:01:19.000Z)
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
domenic at domenicdenicola.com (2013-10-21T19:29:28.811Z)
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`?
>
> ```js
> Object.mixin(obj, {["__proto__"]:42});
> ```

Don't forget this chestnut:

```js
js> var o = {}

js> o.__proto__ = null
null

js> o.__proto__ = 42
42

js> o.toString

js>
```
domenic at domenicdenicola.com (2013-10-21T17:56:52.042Z)
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`?
>>
> ```js
> Object.mixin(obj, {["__proto__"]:42});
> ```

Don't forget this chestnut:

```js
js> var o = {}

js> o.__proto__ = null
null

js> o.__proto__ = 42
42

js> o.toString

js>
```