tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

testDirectProxyConstruct1.js (329B)


      1 // Forward to the target if the trap is undefined
      2 var p;
      3 var target = function (x, y) {
      4    assertEq(new.target, p);
      5    this.foo = x + y;
      6 }
      7 
      8 for (p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) {
      9    var obj = new p(2, 3);
     10    assertEq(obj.foo, 5);
     11    assertEq(Object.getPrototypeOf(obj), target.prototype);
     12 }