tor-browser

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

testDirectProxyHas3.js (397B)


      1 load(libdir + "asserts.js");
      2 
      3 /*
      4 * Throw a TypeError if the trap reports a non-configurable own property as
      5 * non-existent
      6 */
      7 var target = {};
      8 Object.defineProperty(target, 'foo', {
      9    configurable: false
     10 });
     11 var handler = { has: () => false };
     12 for (p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy])
     13    assertThrowsInstanceOf(function () { 'foo' in p; }, TypeError);