tor-browser

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

scroll-to-unreachable-area.html (696B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <meta name="viewport" content="width=device-width, minimum-scale=0.5">
      4 <style>
      5 html {
      6  overflow: hidden;
      7 }
      8 html, body {
      9  margin: 0;
     10  width: 100%;
     11  height: 100%;
     12 }
     13 div {
     14  position: absolute;
     15 }
     16 </style>
     17 <div style="background: red; width: 300%; height: 300%;"></div>
     18 <div id="green" style="background: green; width: 200%; height: 200%;"></div>
     19 <div style="background: blue; width: 100%; height: 100%;"></div>
     20 <script>
     21 document.addEventListener('MozReftestInvalidate', () => {
     22  const rect = green.getBoundingClientRect();
     23  window.scrollTo(rect.right, rect.bottom);
     24  document.documentElement.classList.remove('reftest-wait');
     25 });
     26 </script>
     27 </html>