- From: Anne van Kesteren <notifications@github.com>
- Date: Thu, 15 May 2025 23:28:41 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1079/review/2845622027@github.com>
@annevk commented on this pull request.
> @@ -13,12 +13,12 @@ Indent: 1
<pre class=anchors>
urlPrefix: https://www.w3.org/TR/xml/#NT-
Should we add `spec: XML` while here?
> @@ -177,19 +177,59 @@ first <a>following</a> <a for=tree>sibling</a> or null if it has no <a for=tree>
added.
-<h3 id=namespaces>Namespaces</h3>
+<h3 id=name-validation oldids=namespaces>Name validation</h3>
I'd prefer just living with historical artifacts like that and not touching blame for them.
> + <li><p>Return true.
+</ol>
+
+<p class=note>This concept is used to validate [=/element=] [=Element/local names=], when
+constructed by DOM APIs. The intention is to allow any name that is possible to construct using the
+HTML parser (the branch where the first [=code point=] is an [=ASCII alpha=]), plus some additional
+possibilities. For those additional possibilities, the ASCII range is restricted for historical
+reasons, but beyond ASCII anything is allowed.
+
+<div class=note>
+ <p>The following JavaScript-compatible regular expression is an implementation of the above
+ definition:
+
+ <pre class=lang-javascript>
+ /^(?:[A-Za-z][^\0\t\n\f\r\u0020/>]*)|(?:[:_\u0080-\u{10FFFF}][A-Za-z0-9-.:_\u0080-\u{10FFFF}]*)$/u
+ </pre>
Should this be `<pre><code class=lang-javascript>`?
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1079#pullrequestreview-2845622027
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/dom/pull/1079/review/2845622027@github.com>
Received on Friday, 16 May 2025 06:28:45 UTC