tor-browser

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

parser-inserted-async-inline-module-with-import.html (762B)


      1 <!DOCTYPE html>
      2 <head>
      3 <title>Parser-inserted async inline module script elements with "blocking=render" are render-blocking</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script>
      7  window.did_execute_script = false;
      8 </script>
      9 <script type="module" blocking="render" async>
     10  import "/loading/resources/dummy.js?pipe=trickle(d1)";
     11  window.did_execute_script = true;
     12 </script>
     13 </head>
     14 <div id="dummy">some text</div>
     15 
     16 <script>
     17    promise_test(async t => {
     18      await new Promise(resolve => requestAnimationFrame(() => resolve()));
     19      assert_true(window.did_execute_script, "Parser-inserted async render-blocking inline module script should execute before rAF callback");
     20    });
     21 </script>