tor-browser

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

anim-change-display-none-for-target-elem.html (727B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3  <head>
      4    <title>Test animation on an element that dynamically becomes 'display:none'</title>
      5  </head>
      6  <body style="background-color: lime;">
      7    <div>
      8      <svg>
      9        <rect width="100%" height="100%" fill="blue" id="rect">
     10          <animate attributeName="fill" from="brown" to="red" dur="100s"/>
     11        </rect>
     12      </svg>
     13    </div>
     14    <script>
     15      document.addEventListener('MozReftestInvalidate', function() {
     16        var rect = document.getElementById("rect");
     17        rect.style.display = "none";
     18 
     19        requestAnimationFrame(function(time) {
     20          document.documentElement.removeAttribute("class");
     21        });
     22      });
     23    </script>
     24  </body>
     25 </html>