tor-browser

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

scroll-tree-parent-construction.html (987B)


      1 <!DOCTYPE HTML>
      2 <html class="test-wait">
      3 <head>
      4 <style>
      5  #ifr { border: 5px solid #ddd; width: 200px; height: 150px; }
      6 </style>
      7 </head>
      8 <body>
      9 <iframe id=ifr srcdoc="
     10  <style>
     11  body { margin: 0 }
     12  * { box-sizing: border-box }
     13  .c1 { width: 90px; height: 300px; }
     14  .f1 {
     15    position: fixed;
     16    background: #ddf;
     17    left: 30px;
     18    top: 10px;
     19    width: 120px;
     20    height: 120px;
     21  }
     22  .s1 {
     23    overflow: scroll;
     24    margin: 10px;
     25    height: 100px;
     26    width: 100px;
     27    border: 5px solid gray;
     28  }
     29  </style>
     30  <div class=c1>AAA</div>
     31  <div class=f1>
     32    <div class=s1>
     33      <div class=c1>AAA</div>
     34    </div>
     35  </div>"></iframe>
     36 <script>
     37  raf = async () => {
     38    return new Promise(resolve => {
     39      requestAnimationFrame(resolve);
     40    });
     41  }
     42  onload = async () => {
     43    await raf();
     44    await raf();
     45    ifr.contentWindow.location.reload();
     46    for (let i = 0; i < 10; i++)
     47      await raf();
     48    document.documentElement.className = "";
     49  };
     50 </script>
     51 </body>
     52 </html>