tor-browser

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

struct-dom-03-b-isvalid.html (4022B)


      1 <!DOCTYPE html>
      2 <html lang='en'>
      3 <head>
      4 <title>struct-dom-03-b-manual.svg</title>
      5 <meta charset='utf-8'>
      6 </head>
      7 <body>
      8 <h1>Source SVG: struct-dom-03-b-manual.svg</h1>
      9 <svg version="1.1" baseProfile="basic" onload="domTest(evt)" id="svg-root"
     10  width="100%" height="100%" viewBox="0 0 480 360"
     11  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
     12  <!--======================================================================-->
     13  <!--=  SVG 1.1 2nd Edition Test Case                                     =-->
     14  <!--======================================================================-->
     15  <!--=  Copyright 2009 World Wide Web Consortium, (Massachusetts          =-->
     16  <!--=  Institute of Technology, European Research Consortium for         =-->
     17  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
     18  <!--=  All Rights Reserved.                                              =-->
     19  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
     20  <!--======================================================================-->
     21  
     22  <title id="test-title">$RCSfile: struct-dom-03-b.svg,v $</title>
     23  <defs>
     24    <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
     25      <font-face-src>
     26        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
     27      </font-face-src>
     28    </font-face>
     29  </defs>
     30  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
     31    <script type="text/ecmascript"><![CDATA[
     32 
     33      var featureStrings = new Array();
     34      var length = 0;
     35      featureStrings[length++] = "uievents";
     36      featureStrings[length++] = "mouseevents";
     37      featureStrings[length++] = "mutationevents";
     38      featureStrings[length++] = "traversal";
     39      featureStrings[length++] = "org.w3c.svg";
     40      var svg_ns = "http://www.w3.org/2000/svg"
     41      function domTest(evt) {
     42      // Get Document
     43      var target = evt.target;
     44      var doc = target.ownerDocument;
     45 
     46      // Get DOMImplementation
     47      var domImpl = doc.implementation;
     48 
     49      //
     50      // Iterate through the feature strings
     51      //
     52      for(var i=0; i<featureStrings.length; i++){
     53      var supports = domImpl.hasFeature(featureStrings[i], '2.0');
     54      //
     55      // if time, pretty up by putting xml to traveral in a left column and
     56      // org.w3c.svg to org.w3c.dom.svg.all in a right column; add an extra
     57      // parameter to addTextElement for x coord, and test if i < 9
     58      //
     59      addTextElement(featureStrings[i], supports, doc, doc.getElementById("test-body-content"), (50 + 50*i));
     60      }
     61      }
     62 
     63      function addTextElement(label, value, doc, svg, y){
     64      var newText = doc.createElementNS(svg_ns, 'text');
     65      newText.setAttribute('font-size', '30');
     66      newText.setAttribute('x', '10');
     67      newText.setAttribute('y', y);
     68      var textValue = label;
     69      var textContent = doc.createTextNode(textValue);
     70      newText.appendChild(textContent);
     71      svg.appendChild(newText);
     72 
     73      newText = doc.createElementNS(svg_ns, 'text');
     74      newText.setAttribute('font-size', '30');
     75      newText.setAttribute('x', '370');
     76      newText.setAttribute('y', y);
     77      textValue =  value;
     78      textContent = doc.createTextNode(textValue);
     79      newText.appendChild(textContent);
     80      svg.appendChild(newText);
     81      }
     82 
     83    ]]></script>
     84  </g>
     85  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
     86    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
     87  </g>
     88  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
     89  <!-- comment out this watermark once the test is approved -->
     90  <!--<g id="draft-watermark">
     91    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
     92    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
     93      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
     94  </g>-->
     95 </svg>
     96 </body>
     97 </html>