Proxy handler.has() does not have a receiver argument?
Tom Van Cutsem
tomvc.be at gmail.com
Sat Mar 19 11:46:59 UTC 2016
2016-03-19 0:15 GMT+01:00 Michael Theriot <michael.lee.theriot at gmail.com>:
> To be clear, I'm not suggesting behavior like `getOwnPropertyNames` be
> overridden by anything on the prototype, just a way to use proxies without
> having to instantiate identical copies that all use the same handler.
If you can already reuse the same handler object between multiple proxies,
you're in good shape. There should be very little overhead in creating many
proxy objects that share the same handler. A proxy object is just an empty
object with a hidden reference to its handler.
Besides, if you want to reliably proxy multiple objects, you must
instantiate a proxy per object anyway, otherwise you may get in trouble
with object-identity. A single proxy object that proxies many different
target objects would have only 1 object identity, so all the proxied
targets would appear to be identity-equal.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss