tor-browser

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

event-target-non-svg-1.xhtml (1177B)


      1 <?xml version="1.0" encoding="UTF-8" ?>
      2 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
      3 <!--
      4  Test for non-SVG event bases. This isn't strictly required but we at very
      5  least we want to make sure our behaviour is defined.
      6 -->
      7 <head>
      8 <script src="event-util.js" type="text/javascript"></script>
      9 <script>
     10 function snapshot() {
     11  var svg = document.getElementById("svg");
     12  svg.pauseAnimations();
     13  svg.setCurrentTime(0);
     14  click('a');
     15  var a = document.getElementById('a');
     16  a.style.display = 'none';
     17  window.setTimeout(doSnapshot, 10);
     18 }
     19 
     20 function doSnapshot() {
     21  var svg = document.getElementById("svg");
     22  svg.pauseAnimations();
     23  svg.setCurrentTime(2);
     24  document.documentElement.removeAttribute("class");
     25 }
     26 
     27 document.addEventListener("MozReftestInvalidate", snapshot, false);
     28 setTimeout(snapshot, 4000); // fallback for running outside reftest
     29 
     30 </script>
     31 </head>
     32 <body>
     33 <a href="#" id="a">Play!</a>
     34 <svg xmlns="http://www.w3.org/2000/svg" width="120px" height="120px" id="svg">
     35  <rect width="100" height="100" fill="red">
     36    <set attributeName="fill" attributeType="CSS" to="green"
     37      begin="a.click" dur="4s"/>
     38  </rect>
     39 </svg>
     40 </body>
     41 </html>