blob: 94b88be5e3542d5f8682810ad7294e597d07f3a2 [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.layoutTestController)
layoutTestController.dumpAsText();
document.body.setAttributeNS("", "a", "b");
var attrNamespace = document.body.getAttributeNodeNS("", "a").namespaceURI;
document.write(attrNamespace === null ? "PASS" : ("FAIL: '" + attrNamespace + "'"));
</script>
</body>