tor-browser

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

testWeirdThingsInFunctionConstructor.js (228B)


      1 var f = new Function('x', 'var f = 3; if (x) function f() {}; return f');
      2 assertEq(f(false), 3);
      3 assertEq(typeof f(true), "function");
      4 
      5 var f = new Function('x', '"use strict"; x = 3; return arguments[0]');
      6 assertEq(f(42), 42);