- From: Domenic Denicola <notifications@github.com>
- Date: Sun, 06 Jul 2025 21:52:49 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/issues/1387/3043470394@github.com>
domenic left a comment (whatwg/dom#1387) > No longer being a superset of XML seems quite concerning to me. However, I can't get `a::b` to work with `createElementNS()` in Safari today so are we sure that used to work? We're still a superset of XML. The case `a::b`: - Was allowed by the previous specification, because `createElementNS()` did no validation on the returned local name (the empty string) - Was not allowed by XML, because it doesn't match `NCName ':' NCName` (`NCName` = `Name` without colon). - Was, apparently, not allowed by browsers. So the spec and browsers did not match. > It also seems weird that certain elements (e.g., `a:b`, `a::b`) can only be created through `createElement()`, but I guess that was always the case? This seems reasonable to me. `createElement()` takes a raw local name, so we can validate the local name directly. Whereas `createElementNS()` takes a qualified name, so the browser has to do some extra processing to figure out which part is the prefix vs. local name. Without some sort of escaping scheme to discriminate separator-colons from literal-colons, it seems pretty difficult (impossible?) to encode all possible local names there. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/1387#issuecomment-3043470394 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/1387/3043470394@github.com>
Received on Monday, 7 July 2025 04:52:53 UTC