tor-browser

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

resolution-consistency-in-module-tree.html (908B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <script src="/resources/testharness.js"></script>
      5  <script src="/resources/testharnessreport.js"></script>
      6 </head>
      7 <body>
      8 <script>
      9 step_timeout(() => {
     10  const importMapScript = document.createElement('script');
     11  importMapScript.type = 'importmap';
     12  importMapScript.textContent = JSON.stringify({
     13    imports: {
     14      "../resources/log.sub.js?name=A": "../resources/log.sub.js?name=B"
     15    }
     16  });
     17  document.head.appendChild(importMapScript);
     18 }, 100);
     19 </script>
     20 <script>
     21 const log = [];
     22 </script>
     23 <script type="module" src="../resources/importer.sub.js?pipe=trickle(d0.5)&name=..%2Fresources%2Flog.sub.js%3Fname%3DA"></script>
     24 <script type="module">
     25 test(() => {
     26  assert_array_equals(log, ["log:B"], "Import should use the new import map");
     27 }, "Module tree that started to download before a new import map should still take it into account");
     28 </script>
     29 </body>
     30 </html>