tor-browser

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

iframe-loading-lazy-in-script-disabled-iframe.html (821B)


      1 <!DOCTYPE html>
      2 <head>
      3 <title>Iframes with loading='lazy' in script disabled iframe are not handled
      4       as 'lazy'</title>
      5 <link rel="help" href="https://github.com/scott-little/lazyload">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 </head>
      9 
     10 <div style="height:1000vh;"></div>
     11 <iframe id="iframe" sandbox="allow-same-origin"
     12        src="resources/iframe-loading-lazy-in-viewport.html">
     13 </iframe>
     14 <script>
     15 promise_test(async t => {
     16  await new Promise(resolve => iframe.addEventListener("load", resolve));
     17 
     18  const inner_iframe = iframe.contentDocument.querySelector("iframe");
     19 
     20  assert_equals(inner_iframe.contentDocument.body.textContent.trim(), 'Subframe',
     21              "lazy-load iframe shouldn't be honored in script disabled iframe");
     22 });
     23 </script>