tor-browser

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

hypothetical-box-scroll-parent.html (595B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <title></title>
      4 <link rel=match href=hypothetical-box-scroll-parent-ref.html>
      5 <link rel="help"
      6      href="https://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-width">
      7 <div style="overflow: auto; height: 100px; width: 200px">
      8  <div id="target" style="position: absolute">Original text</div>
      9  <div style="width: 400px; height: 10px"></div>
     10 </div>
     11 <script>
     12  // Scroll the parent.
     13  document.querySelector("div").scrollLeft = 1000;
     14 
     15  // Now force relayout of the abs pos div.
     16  document.getElementById("target").textContent = "Modified text";
     17 </script>