- From: Codifier <notifications@github.com>
- Date: Fri, 27 Jul 2018 10:04:01 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 27 July 2018 17:04:24 UTC
@cscott You state: > On the other hand, document.createElementNS("http://example.com", ":foo") ought to throw a NAMESPACE_ERR (test case ine 56) yet there is no spec language to justify this: if it failed the "validate qualifiedName" test it ought to throw a INVALID_CHARACTER_ERROR, and steps 5 and 6 state: [...] I believe this example is an ambiguous case that could also be taken to mean: it matched the `Name` production (where colons are allowed as `NameStartChar`), but non-null `namespaceURI` was passed, hence the `NAMESPACE_ERR`. The specs for `Document#createElementNS()` are currently pretty lenient as to what combinations of arguments are allowed, particularly where allowing the creation of non-namespaced elements is concerned. It's a bit counter-intuitive to me, when the method name (`...NS()`) seems to suggests it is specifically aimed at creating namespaced element. So, I agree the specs could use some further clarification, or perhaps reevaluation as what should be allowed and what not. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/671#issuecomment-408479955
Received on Friday, 27 July 2018 17:04:24 UTC