struct-dom-17-f-novalid.html (3532B)
1 <!DOCTYPE html> 2 <html lang='en'> 3 <head> 4 <title>struct-dom-17-f-manual.svg</title> 5 <meta charset='utf-8'> 6 </head> 7 <body> 8 <h1>Source SVG: struct-dom-17-f-manual.svg</h1> 9 <svg id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 10 <!--======================================================================--> 11 <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =--> 12 <!--= Institute of Technology, European Research Consortium for =--> 13 <!--= Informatics and Mathematics (ERCIM), Keio University). =--> 14 <!--= All Rights Reserved. =--> 15 <!--= See http://www.w3.org/Consortium/Legal/. =--> 16 <!--======================================================================--> 17 18 <title id="test-title">$RCSfile: struct-dom-17-f.svg,v $</title> 19 <defs> 20 <font-face 21 font-family="SVGFreeSansASCII" 22 unicode-range="U+0-7F"> 23 <font-face-src> 24 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> 25 </font-face-src> 26 </font-face> 27 </defs> 28 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> 29 <svg id="svgTree1"> 30 <rect id="subElem1" /> 31 </svg> 32 <svg id="svgTree2"> 33 <rect id="subElem2" /> 34 </svg> 35 <rect id="siblingElem1" /> 36 <g transform="translate(320,350)" font-size="50"> 37 <text id="failText" fill="red">FAIL</text> 38 <text id="passText" fill="green" display="none">PASS</text> 39 </g> 40 <script><![CDATA[ 41 try 42 { 43 var passedCount = 0; 44 var svgTree1 = document.getElementById("svgTree1"); 45 46 // Test support for "getElementById" on svgTree1 47 var subElem1 = svgTree1.getElementById("subElem1"); 48 if (null != subElem1) 49 { 50 passedCount++; 51 } 52 53 if ("subElem1" == subElem1.id) 54 { 55 passedCount++; 56 } 57 58 // Test that "getElementById" on svgTree1 can't access children in other subtrees 59 if (null == svgTree1.getElementById("subElem2")) 60 { 61 passedCount++; 62 } 63 64 // Test that "getElementById" on svgTree1 can't access elements that are not its children 65 if (null == svgTree1.getElementById("siblingElem1")) 66 { 67 passedCount++; 68 } 69 70 if (4 == passedCount) 71 { 72 document.getElementById("failText").setAttribute("display", "none"); 73 document.getElementById("passText").setAttribute("display", "inline"); 74 } 75 } 76 catch(ex) 77 { 78 // alert('ERROR: ' + ex.message); 79 }]]> 80 </script> 81 </g> 82 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> 83 <text id="revision" x="10" y="340" stroke="none" 84 fill="black">$Revision: 1.3 $</text> 85 </g> 86 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> 87 <!-- comment out this watermark once the test is approved --> 88 <g id="draft-watermark"> 89 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> 90 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" 91 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> 92 </g> 93 </svg> 94 </body> 95 </html>