1 description("Test how Node.prefix setter raises NAMESPACE_ERR.");
3 var href = document.createAttribute("href");
9 // Per DOM3 Core spec, setting to empty is implementation dependent.
10 // Firefox treats empty like null.
12 shouldBe("href.prefix", "null");
14 shouldThrow("document.createAttribute('attr').prefix = 'abc'");
15 shouldThrow("document.createAttributeNS(null, 'attr').prefix = 'abc'");
16 shouldThrow("document.createElementNS(null, 'attr').prefix = 'abc'");
17 shouldThrow("document.createAttributeNS('foo', 'bar').prefix = 'xml'");
18 shouldThrow("document.createElementNS('foo', 'bar').prefix = 'xml'");
19 shouldThrow("document.createAttribute('attr').prefix = 'xmlns'");
20 shouldThrow("document.createAttributeNS('foo', 'attr').prefix = 'xmlns'");
21 shouldThrow("document.createAttribute('xmlns').prefix = 'foo'");