title: Proxy trap that applies to all objects?
body: <p>I want to write a Proxy trap which applies to all objects. I'm trying to modify the behaviour of all JS objects using the <code>set</code> trap, by replacing a specific value with a predefined getter/setter pair.</p>
  <pre class="lang-js prettyprint-override"><code>// This
  const myObj = {
    foo: getterSetter
  }
  
  // Is the same as this
  const myObj = {
    get foo() { ... }
    set foo(v) { ... }
  </code></pre>
  <p>I've tried:</p>
  <ul>
  <li>Redefining <code>Object.prototype.constructor</code> to return a Proxy
  <pre class="lang-js prettyprint-override"><code>Object.prototype.constructor = function() {
    return new Proxy( ... )
  }
  </code></pre>
  </li>
  <li>Setting <code>Object.prototype</code> to a Proxy
  <pre class="lang-js prettyprint-override"><code>Object.prototype = new Proxy( ... )
  </code></pre>
  </li>
  </ul>
  <p>Neither correctly implements the Proxy trap behaviour on all objects.</p>
  <p>Is there a way in which this can be done?</p>
  <p>Non Proxy solutions are also welcome.</p>