blob: f7a9e98afd080bccc7bcc575ba4fdb52a577a623 [file] [log] [blame]
<body>
<p>Test that setAttributeNS("", ...) creates an attribute in null namespace. Per DOM 3 Core,</p>
<pre>In programming languages where empty strings can be differentiated from null, empty strings, when given as a namespace URI, are converted to null.</pre>
<script>
if (window.testRunner)
testRunner.dumpAsText();
document.body.setAttributeNS("", "a", "b");
var attrNamespace = document.body.getAttributeNodeNS("", "a").namespaceURI;
document.write(attrNamespace === null ? "PASS" : ("FAIL: '" + attrNamespace + "'"));
</script>
</body>