tor-browser

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

add-child-in-empty-layer.html (845B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <title>Adding a child to an empty layer</title>
      4 <link rel="help" href="https://www.w3.org/TR/css-transforms-2/">
      5 <link rel="match" href="add-child-in-empty-layer-ref.html">
      6 <style>
      7 .empty-layer {
      8  transform: rotateY(30deg) rotateX(-30deg);
      9  width: 100px;
     10  height: 100px;
     11 }
     12 .inserted {
     13  width: 50px;
     14  height: 50px;
     15  background-color: red;
     16 }
     17 </style>
     18 <!--
     19  Force to create composited layer with empty then inserts a child the layer.
     20 -->
     21 <div id="empty-layer" class="empty-layer"></div>
     22 <script>
     23 requestAnimationFrame(() => {
     24  requestAnimationFrame(() => {
     25    var div = document.getElementById("empty-layer");
     26    div.innerHTML = '<div id="inserted" class="inserted"></div>';
     27    requestAnimationFrame(() => {
     28      document.documentElement.removeAttribute('class');
     29    });
     30  });
     31 });
     32 </script>