title: Create Proxy for prototype method
body: <p>I am fumbling for a way to avoid creating a new Proxy for each new object instance. I have 1 prototype, and I want to use just 1 Proxy. That's the goal. If I use a Proxy per instance, I could have thousands and thousands of Proxy objects which hurts performance a lot.</p>
  
  <p>Ultimately what I am doing is setting properties on a prototype method, like this:</p>
  
  <pre><code>const v = {
    foo: function () {
      assert.notEqual(this, v);
    }
  };
  
  v.foo.bar = function(){
     // I need `this` to be a certain value here
  };
  
  v.foo.zam = function(){
     // I need `this` to be a certain value here
  };
  </code></pre>
  
  <p>but I need those properties to still have the same context (<code>this</code> value), as the prototype method itself would.</p>
  
  <pre><code>const assert = require('assert');
  
  const v = {
    foo: function () {
      assert.notEqual(this, v);
    }
  };
  
  new Proxy(v.foo, {
    get: function(target, prop){
       console.log(this); // I am looking to get access to `x` here
    }
  });
  
  
  const x = Object.create(v);
  
  x.foo();
  const z = x.foo.bar; // I would have guessed this would have fired the Proxy `get` method.
  </code></pre>
  
  <p>I am trying to do some black magic, where I can access the <code>this</code> value of the v prototype methods from the Proxy. In this case, that would mean accessing the value of <code>x</code> from the Proxy. Is this possible somehow? Also, I can't figure out why the get method of the Proxy is not called when I read the <code>bar</code> property from  <code>x.foo</code>, as in <code>x.foo.bar</code>.</p>
  
  <p>this Github gist I just created is a little bit closer:
  <a href="https://gist.github.com/ORESoftware/757dd6285d554f4f52ae415fd39141a5" rel="nofollow noreferrer">https://gist.github.com/ORESoftware/757dd6285d554f4f52ae415fd39141a5</a></p>
  
  <p>however, I still don't think it's possible to do what I want to do. The rationale is so that I can reuse the same Proxy object in the prototype, without having to create a new Proxy for each instance.</p>