Skip to content
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

Allow more characters in custom element names #7991

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

domenic
Copy link
Member

@domenic domenic commented Jun 7, 2022

This follows whatwg/dom#1079.

(See WHATWG Working Mode: Changes for more details.)


/custom-elements.html ( diff )
/infrastructure.html ( diff )

@domenic domenic added normative change topic: custom elements Relates to custom elements (as defined in DOM and HTML) labels Jun 7, 2022
@domenic domenic requested a review from annevk June 7, 2022 16:24
Copy link
Member

@annevk annevk left a 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.

@annevk
Copy link
Member

annevk commented Jun 8, 2022

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?

@domenic
Copy link
Member Author

domenic commented Jun 8, 2022

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...

@domenic domenic added the needs tests Moving the issue forward requires someone to write tests label Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs tests Moving the issue forward requires someone to write tests normative change topic: custom elements Relates to custom elements (as defined in DOM and HTML)
Development

Successfully merging this pull request may close these issues.

2 participants