tor-browser

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

scripting-enabled.html (689B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>JS is disabled on documents created without a browsing context</title>
      4 <link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-n-script">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script>
      8 test(function(t) {
      9  var doc = document.implementation.createHTMLDocument();
     10  window.fail_test = t.unreached_func('should not have been called');
     11 
     12  var script = doc.createElement('script');
     13  script.textContent = 'fail_test();';
     14  doc.documentElement.appendChild(script);
     15 }, 'script on document returned by createHTMLDocument should not execute');
     16 </script>