tor-browser

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

object-in-display-none-load-event.html (685B)


      1 <!doctype html>
      2 <html>
      3 <meta charset=utf-8>
      4 <title>Test that an object in a display:none subtree does not block the load event</title>
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script>
      8  let objLoaded = false;
      9  function objOnload() {
     10    objLoaded = true;
     11  }
     12  async_test(t => {
     13    addEventListener('load', t.step_func_done(() => {
     14      assert_true(!!document.querySelector('object'));
     15      assert_false(objLoaded);
     16    }));
     17  }, 'Load event triggered on window without the object element load');
     18 </script>
     19 <div style="display: none;">
     20  <object data="data:text/html," onload="objOnload()"></object>
     21 </div>
     22 </html>