tor-browser

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

testDirectProxyKeys6.js (397B)


      1 load(libdir + "asserts.js");
      2 
      3 // Throw a TypeError if the trap skips a non-configurable enumerable property
      4 var target = {};
      5 Object.defineProperty(target, 'foo', {
      6    enumerable: true,
      7    configurable: false
      8 });
      9 
     10 var handler = { ownKeys: () => [] };
     11 for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy])
     12    assertThrowsInstanceOf(() => Object.keys(p), TypeError);