tor-browser

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

dynamic-rect-04.xhtml (1161B)


      1 <?xml version="1.0"?>
      2 <!--
      3     Any copyright is dedicated to the Public Domain.
      4     http://creativecommons.org/publicdomain/zero/1.0/
      5 -->
      6 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
      7 <head>
      8 <title>Testcase reference file dynamic svg creation</title>
      9 <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=438867 -->
     10 <script>
     11 window.onload = function() {
     12    document.addEventListener("MozReftestInvalidate", doTest, false);
     13    setTimeout(doTest, 4000); // fallback for running outside reftest
     14 }
     15 
     16 function doTest() {
     17    var SVG_NS = "http://www.w3.org/2000/svg";
     18    var svg = document.createElementNS(SVG_NS, 'svg');
     19    svg.style.position = 'absolute';
     20    svg.style.left = '0px';
     21    svg.style.top = '0px';
     22    svg.style.width = '100%';
     23    svg.style.height = '100%';
     24    document.body.appendChild(svg);
     25    
     26    var rect = document.createElementNS(SVG_NS, "rect");
     27    rect.setAttribute('width', '100%');
     28    rect.setAttribute('height', '100%');
     29    rect.setAttribute('fill', 'lime');
     30    svg.appendChild(rect);
     31 document.documentElement.removeAttribute('class');
     32 }
     33 </script>
     34 </head>
     35 <body>
     36 <hr style="clear: both;"/>
     37 </body>
     38 </html>