tor-browser

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

parse-error-location.tentative.html (815B)


      1 <!DOCTYPE html>
      2 <meta charset=utf-8>
      3 <title>JSON modules: parse error file location</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <div id=log></div>
      7 <script>
      8 setup({
      9  allow_uncaught_exception: true,
     10 });
     11 async_test(t => {
     12  window.addEventListener("error", t.step_func_done(e => {
     13    // The specific values of these properties are implementation-defined
     14    // per https://html.spec.whatwg.org/#report-an-exception
     15    // and https://html.spec.whatwg.org/#extract-error,
     16    // but it's preferable if implementations provide the
     17    // correct file location.
     18    assert_equals(e.filename, new URL("parse-error.json", location).href);
     19  }));
     20 });
     21 </script>
     22 <script type="module">
     23 import v from "./parse-error.json" with { type: "json" };
     24 </script>