1 |
<svg xmlns="http://www.w3.org/2000/svg"> |
2 |
<text id="result" x="1" y="20">FAIL (not executed)</text> |
3 |
<script type="text/javascript"> |
4 |
var result = document.getElementById ('result'); |
5 |
result.firstChild.data = 'FAIL'; |
6 |
var el = document.createElement ('elementName'); |
7 |
if (typeof (el.localName) == 'undefined') { |
8 |
result.firstChild.data = 'FAIL (undefined)'; |
9 |
} else if (el.localName == null) { |
10 |
result.firstChild.data = 'PASS (as per DOM3)'; |
11 |
} else if (el.localName == 'elementname') { |
12 |
result.firstChild.data = 'FAIL (lowercase)'; |
13 |
} else if (el.localName == 'elementName') { |
14 |
result.firstChild.data = 'FAIL (as is)'; |
15 |
} else if (el.localName == 'ELEMENTNAME') { |
16 |
result.firstChild.data = 'FAIL (uppercase)'; |
17 |
} else { |
18 |
result.firstChild.data = 'FAIL'; |
19 |
} |
20 |
</script> |
21 |
</svg> |