16 lines
685 B
XML
16 lines
685 B
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<svg xmlns="http://www.w3.org/2000/svg" onload="init()">
|
|
<script type="text/ecmascript"><![CDATA[
|
|
function init()
|
|
{
|
|
var polyline = document.createElementNS("http://www.w3.org/2000/svg", "polyline");
|
|
var polygon = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
|
|
if (polyline == "[object SVGPolylineElement]" &&
|
|
polygon == "[object SVGPolygonElement]") {
|
|
document.getElementById("passed").setAttribute("fill", "green");
|
|
}
|
|
}
|
|
]]></script>
|
|
<rect id="passed" x="0" y="0" width="100" height="100" fill="red"/>
|
|
</svg>
|