tor-browser

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

script-element-css-src.html (559B)


      1 <!DOCTYPE html>
      2 <title>&lt;script&gt; with CSS src</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script>
      6  window.log = [];
      7 
      8  const test_load = async_test(
      9      "Test that <script> doesn't load when the src is CSS.");
     10  window.addEventListener("load", test_load.step_func_done(ev => {
     11    assert_array_equals(log, ["error"]);
     12  }));
     13 </script>
     14 <script type="module" src="./resources/basic.css" onload="t.unreached_func('CSS src should fail to load')" onerror="log.push('error')"></script>