| <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> |