20 lines
887 B
XML
20 lines
887 B
XML
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Mixed content: HTML inside SVG without foreignObject</title>
|
|
</head>
|
|
<body>
|
|
<p><input type="text" size="50" id="test" value="This test has FAILED. (script did not run)"/></p>
|
|
<p>It should say "PASSED" above and there should be a green circle below.</p>
|
|
<svg xmlns="http://www.w3.org/2000/svg" height="200" width="200">
|
|
<circle cx="50" cy="50" r="50" fill="green"/>
|
|
<label for="test" xmlns="http://www.w3.org/1999/xhtml">FAIL: This should not be rendered.</label>
|
|
</svg>
|
|
<script type="text/javascript"><![CDATA[
|
|
document.getElementById('test').value = 'This test has FAILED.';
|
|
var x = document.getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'label')[0].htmlFor;
|
|
if (x && x == 'test') {
|
|
document.getElementById('test').value = 'This test has PASSED.';
|
|
}
|
|
]]></script>
|
|
</body>
|
|
</html> |