tor-browser

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

root-scrollbar-with-fixed-background-ref.html (930B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait" style="background: lightblue;">
      3 <title>View transitions: capture root element with scrollbar (ref)</title>
      4 <link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
      5 <link rel="author" href="mailto:khushalsagar@chromium.org">
      6 
      7 <style>
      8 #container {
      9  background: lightblue;
     10 }
     11 #first {
     12  width: 10px;
     13  background: linear-gradient(green, blue);
     14  height: 1000px;
     15 }
     16 body {
     17  margin: 0px;
     18  padding: 0px;
     19  filter: invert(1);
     20 }
     21 </style>
     22 
     23  <div id=container>
     24    <div id=first></div>
     25  </div>
     26 
     27 <script>
     28  function scrollContainer() {
     29    addEventListener("scroll", () => {
     30      requestAnimationFrame(() => {
     31        requestAnimationFrame(() => {
     32          document.documentElement.classList.remove("reftest-wait");
     33        });
     34      });
     35    }, { once: true, capture: true });
     36    document.documentElement.scrollTop = 500;
     37  }
     38 
     39  onload = scrollContainer();
     40 </script>
     41 </html>