tor-browser

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

scripting.html (1023B)


      1 <!DOCTYPE html>
      2 <link rel="help" href="https://drafts.csswg.org/mediaqueries-5/#scripting">
      3 <script type="text/javascript" src="/resources/testharness.js"></script>
      4 <script type="text/javascript" src="/resources/testharnessreport.js"></script>
      5 <script type="text/javascript" src="resources/matchmedia-utils.js"></script>
      6 
      7 <script>
      8 query_should_be_known("(scripting)");
      9 query_should_be_known("(scripting: enabled)");
     10 query_should_be_known("(scripting: initial-only)");
     11 query_should_be_known("(scripting: none)");
     12 
     13 query_should_be_unknown("(scripting: 0)");
     14 query_should_be_unknown("(scripting: 10px)");
     15 query_should_be_unknown("(scripting: invalid)");
     16 
     17 test(() => {
     18  let match_enabled = window.matchMedia("(scripting: enabled)");
     19  assert_true(match_enabled.matches);
     20 }, "Check that scripting currently matches 'enabled'");
     21 
     22 test(() => {
     23  let booleanContext = window.matchMedia("(scripting)");
     24  assert_true(booleanContext.matches);
     25 }, "Check that scripting currently evaluates to true in the boolean context");
     26 </script>