-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Allow more characters in custom element names #7991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I like how this simplifies things quite a bit and reduces our reliance on ABNF and derivatives.
Hmm, I guess 0th is technically correct, but I wonder if we are using that consistently. Perhaps we should support string[0] to make it less confusing? |
I doubt we are using it consistently. But the algorithms in https://infra.spec.whatwg.org/#strings use it indirectly quite a lot, e.g. "Let potentialPrefixCodeUnit be the ith code unit of potentialPrefix." where i can be 0. And the plus side is that nobody will be confused by 0th, although they might be confused by first. Allowing string[0] is a bit tricky IMO because it doesn't clarify whether that's code point or code unit. Maybe string[0]cu and string[0]cp, but that feels a bit like adding notation for notation's sake... |
Thanks for removing the EBNF, it is much easier for me to read and implement this way! |
I've rebased this onto main. It was pretty straightforward. |
This patch changes the parsing of custom element names in DOM APIs to allow more flexibility and better parity with the HTML parser. Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I516de464254c5413e5610aedc3a70a73ea236616 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6559428 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1470050}
This patch changes the parsing of custom element names in DOM APIs to allow more flexibility and better parity with the HTML parser. Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I516de464254c5413e5610aedc3a70a73ea236616 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6559428 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1470050}
This patch changes the parsing of custom element names in DOM APIs to allow more flexibility and better parity with the HTML parser. Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I516de464254c5413e5610aedc3a70a73ea236616 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6559428 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1470050}
Here is a new WPT: web-platform-tests/wpt#52982 And here are WPT changes which haven't been upstreamed yet: https://chromium-review.googlesource.com/c/chromium/src/+/6615057 |
I'll plan on merging this and github.com/whatwg/dom/pull/1079 on Monday or Tuesday. Thanks @josepharhar for helping finish this up!! |
Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I216706db819aee655c7e05fd492eed546f449a1e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6615057 Reviewed-by: David Baron <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1473709}
Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I216706db819aee655c7e05fd492eed546f449a1e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6615057 Reviewed-by: David Baron <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1473709}
Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I216706db819aee655c7e05fd492eed546f449a1e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6615057 Reviewed-by: David Baron <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1473709}
…names, a=testonly Automatic update from web-platform-tests Allow more characters in custom element names This patch changes the parsing of custom element names in DOM APIs to allow more flexibility and better parity with the HTML parser. Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I516de464254c5413e5610aedc3a70a73ea236616 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6559428 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1470050} -- wpt-commits: 1f3beebca7401634153d6d14c00742b29edbd072 wpt-pr: 52982
…names, a=testonly Automatic update from web-platform-tests Allow more characters in custom element names This patch changes the parsing of custom element names in DOM APIs to allow more flexibility and better parity with the HTML parser. Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I516de464254c5413e5610aedc3a70a73ea236616 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6559428 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1470050} -- wpt-commits: 1f3beebca7401634153d6d14c00742b29edbd072 wpt-pr: 52982
…names, a=testonly Automatic update from web-platform-tests Allow more characters in custom element names This patch changes the parsing of custom element names in DOM APIs to allow more flexibility and better parity with the HTML parser. Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I516de464254c5413e5610aedc3a70a73ea236616 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6559428 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1470050} -- wpt-commits: 1f3beebca7401634153d6d14c00742b29edbd072 wpt-pr: 52982
…names, a=testonly Automatic update from web-platform-tests Update tests for relaxed custom element names Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I216706db819aee655c7e05fd492eed546f449a1e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6615057 Reviewed-by: David Baron <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1473709} -- wpt-commits: 2548f608722cd9df1243e8ed396e54ef18e44f0a wpt-pr: 53130
…names, a=testonly Automatic update from web-platform-tests Update tests for relaxed custom element names Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I216706db819aee655c7e05fd492eed546f449a1e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6615057 Reviewed-by: David Baron <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1473709} -- wpt-commits: 2548f608722cd9df1243e8ed396e54ef18e44f0a wpt-pr: 53130
…names, a=testonly Automatic update from web-platform-tests Update tests for relaxed custom element names Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I216706db819aee655c7e05fd492eed546f449a1e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6615057 Reviewed-by: David Baron <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1473709} -- wpt-commits: 2548f608722cd9df1243e8ed396e54ef18e44f0a wpt-pr: 53130
…names, a=testonly Automatic update from web-platform-tests Allow more characters in custom element names This patch changes the parsing of custom element names in DOM APIs to allow more flexibility and better parity with the HTML parser. Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I516de464254c5413e5610aedc3a70a73ea236616 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6559428 Reviewed-by: Mason Freed <masonfchromium.org> Commit-Queue: Joey Arhar <jarharchromium.org> Cr-Commit-Position: refs/heads/main{#1470050} -- wpt-commits: 1f3beebca7401634153d6d14c00742b29edbd072 wpt-pr: 52982 UltraBlame original commit: 5f66415665cd00458acf241f316cedd1bc60aa34
…names, a=testonly Automatic update from web-platform-tests Update tests for relaxed custom element names Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I216706db819aee655c7e05fd492eed546f449a1e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6615057 Reviewed-by: David Baron <dbaronchromium.org> Commit-Queue: Joey Arhar <jarharchromium.org> Cr-Commit-Position: refs/heads/main{#1473709} -- wpt-commits: 2548f608722cd9df1243e8ed396e54ef18e44f0a wpt-pr: 53130 UltraBlame original commit: aacdeef158c7a37fb012b1d57748456534927886
…names, a=testonly Automatic update from web-platform-tests Allow more characters in custom element names This patch changes the parsing of custom element names in DOM APIs to allow more flexibility and better parity with the HTML parser. Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I516de464254c5413e5610aedc3a70a73ea236616 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6559428 Reviewed-by: Mason Freed <masonfchromium.org> Commit-Queue: Joey Arhar <jarharchromium.org> Cr-Commit-Position: refs/heads/main{#1470050} -- wpt-commits: 1f3beebca7401634153d6d14c00742b29edbd072 wpt-pr: 52982 UltraBlame original commit: 5f66415665cd00458acf241f316cedd1bc60aa34
…names, a=testonly Automatic update from web-platform-tests Update tests for relaxed custom element names Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I216706db819aee655c7e05fd492eed546f449a1e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6615057 Reviewed-by: David Baron <dbaronchromium.org> Commit-Queue: Joey Arhar <jarharchromium.org> Cr-Commit-Position: refs/heads/main{#1473709} -- wpt-commits: 2548f608722cd9df1243e8ed396e54ef18e44f0a wpt-pr: 53130 UltraBlame original commit: aacdeef158c7a37fb012b1d57748456534927886
…names, a=testonly Automatic update from web-platform-tests Allow more characters in custom element names This patch changes the parsing of custom element names in DOM APIs to allow more flexibility and better parity with the HTML parser. Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I516de464254c5413e5610aedc3a70a73ea236616 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6559428 Reviewed-by: Mason Freed <masonfchromium.org> Commit-Queue: Joey Arhar <jarharchromium.org> Cr-Commit-Position: refs/heads/main{#1470050} -- wpt-commits: 1f3beebca7401634153d6d14c00742b29edbd072 wpt-pr: 52982 UltraBlame original commit: 5f66415665cd00458acf241f316cedd1bc60aa34
…names, a=testonly Automatic update from web-platform-tests Update tests for relaxed custom element names Spec PR: whatwg/html#7991 Bug: 40122442, 40228234 Change-Id: I216706db819aee655c7e05fd492eed546f449a1e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6615057 Reviewed-by: David Baron <dbaronchromium.org> Commit-Queue: Joey Arhar <jarharchromium.org> Cr-Commit-Position: refs/heads/main{#1473709} -- wpt-commits: 2548f608722cd9df1243e8ed396e54ef18e44f0a wpt-pr: 53130 UltraBlame original commit: aacdeef158c7a37fb012b1d57748456534927886
This follows whatwg/dom#1079.
(See WHATWG Working Mode: Changes for more details.)
/custom-elements.html ( diff )
/infrastructure.html ( diff )