Michael Theriot (2016-03-18T13:54:14.000Z)
michael.lee.theriot at gmail.com (2016-03-18T14:12:41.302Z)
I'm trying to make the proxy-as-a-prototype pattern work but I've just discovered the `ownKeys` trap is never called on proxies on the prototype. So even if the `has` trap is allowed to see the `receiver`, and thus verify the properties "0", "1" exist, this pattern would fail to return the properties "0", "1" exist on an `Object.getOwnPropertyNames` call. Disappointing! I'd rather use a proxy on the prototype than create one for each instance but without a correct `ownKeys` return it just doesn't come full circle. Is there a trick to make this work or am I out of luck here? I can only think of actually defining the properties to make it work, which defeats the idea of using a proxy on the prototype to begin with. Regardless I agree that traps called on a prototype chain should always receive the `receiver` as an argument. I think the only trap other than `set`, `get`, and `has` that can do this is the `getPrototypeOf` trap (currently does not have a `receiver`) when the `instanceof` check needs to climb the prototype chain.