> On Jul 28, 2017, at 5:50 PM, Logan Smyth <[email protected]> wrote:
> 
> 
>     return Reflect.get(target, name, receiver);
> }
> ```
> The third argument `receiver` being the important part here. 
> `Reflect.get(target, name, receiver)` is the correct reproduction of the 
> default non-proxy `get` behavior. `target[name]` is close, but loses 
> information, causing the bad behavior you are seeing. `target` is the actual 
> target initially passed to `new Proxy`, while `receiver` is the object that 
> was actually used to access the property, which is the actual proxy object in 
> this case.
> 

yes, the is exactly the reason for the 3rd parameter of Reflect.get
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to