tor-browser

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

struct-dom-12-b-isvalid.html (3508B)


      1 <!DOCTYPE html>
      2 <html lang='en'>
      3 <head>
      4 <title>struct-dom-12-b-manual.svg</title>
      5 <meta charset='utf-8'>
      6 </head>
      7 <body>
      8 <h1>Source SVG: struct-dom-12-b-manual.svg</h1>
      9 <svg version="1.1" baseProfile="basic" 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-12-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 
     32    <defs>
     33      <rect id="reference" x="240" y="1" width="239" height="358"/>
     34      <script type="text/ecmascript"><![CDATA[
     35        function test (event) {
     36 
     37        // get pointers to use and reference elements
     38        var reference = document.getElementById('reference');
     39        var use = document.getElementById('use');
     40 
     41        // initialize the pass count and colors
     42        var pass = 0;
     43        var colors = ['red', 'orange', 'green'];
     44 
     45        // event.target.correspondingUseElement test
     46        if (event.target.correspondingUseElement === use) {
     47        document.getElementById('assertion_1').setAttributeNS(null, 'fill', 'green');
     48        pass++;
     49        }
     50 
     51        // event.target.correspondingElement test
     52        if (event.target.correspondingElement === reference) {
     53        document.getElementById('assertion_2').setAttributeNS(null, 'fill', 'green');
     54        pass++;
     55        }
     56 
     57        // show the result
     58        use.setAttributeNS(null, 'fill', colors[pass]);
     59        }
     60 
     61 
     62      ]]></script>
     63    </defs>
     64 
     65    <use id="use" xlink:href="#reference" onclick="test(evt)" fill="grey"/>
     66 
     67    <text transform="translate(5,20)">Click on the grey rectangle to start</text>
     68    <text id="assertion_1" fill="red" transform="translate(5,80)">Test for correspondingUseElement</text>
     69    <text id="assertion_2" fill="red" transform="translate(5,110)">Test for correspondingElement</text>
     70 
     71  </g>
     72  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
     73    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.3 $</text>
     74  </g>
     75  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
     76  <!-- comment out this watermark once the test is approved 
     77  <g id="draft-watermark">
     78    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
     79    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
     80      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
     81  </g>-->
     82 </svg>
     83 </body>
     84 </html>