> Isn't the purpose of the proxy to be exchanged with the original, without any
> negative side effects?
This is not possible. Proxies do not reflect internal slots, so for example, in
a browser,
```js
var obj = document;
var proxy = new Proxy(obj, {});
Node.prototype.contains.call(obj, obj); // true
Node.prototype.contains.call(proxy, proxy); // TypeError: 'contains' called on
an object that does not implement interface Node.
```
So it would be bad if `obj === proxy` returned true but the values had
different behaviors. I think `+0 === -0` despite `1/+0 !== 1/-0` is already
enough of a nightmare.
--Oriol
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss