tor-browser

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

script-inserted-module-script.html (750B)


      1 <!DOCTYPE html>
      2 <title>Script-inserted module script elements with "blocking=render" are render-blocking</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="support/test-render-blocking.js"></script>
      6 
      7 <script>
      8 const moduleScript = document.createElement('script');
      9 moduleScript.type = 'module';
     10 moduleScript.blocking = 'render';
     11 moduleScript.src = 'support/dummy-1.mjs?pipe=trickle(d1)';
     12 document.head.appendChild(moduleScript);
     13 </script>
     14 
     15 <div id="dummy">some text</div>
     16 
     17 <script>
     18 test_render_blocking(
     19    moduleScript,
     20    () => assert_equals(document.getElementById('dummy').textContent, '1'),
     21    'Script-inserted render-blocking module script is evaluated');
     22 </script>