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

Consider restricting custom element names to ASCII #1754

Closed
dominiccooney opened this issue Sep 7, 2016 · 4 comments
Closed

Consider restricting custom element names to ASCII #1754

dominiccooney opened this issue Sep 7, 2016 · 4 comments
Assignees
Labels
topic: custom elements Relates to custom elements (as defined in DOM and HTML)

Comments

@dominiccooney
Copy link

Disclosure: I am filing this bug report on behalf of someone else; the following is a paraphrase:

Consider disallowing stuff outside ASCII in potential custom element names in v1. Permitting emoji and random latin1 stuff in there makes checking whether an element name is a potential element name much slower.

If I do some digging Blink may be able to quantify this, although I believe the cost of checking these names to be a small part of, for example, creating an element, loading a page, etc.

@domenic domenic added the topic: custom elements Relates to custom elements (as defined in DOM and HTML) label Sep 7, 2016
@domenic
Copy link
Member

domenic commented Sep 7, 2016

This was previously discussed at WICG/webcomponents#239 where we reached consensus on the current semantics. To reopen that discussion we'd probably want to see some data, indeed; it would be great to get an idea whether a custom elements heavy page (using only ASCII) performs significantly slower in some way with the current semantics vs. ones that only permit ASCII.

@annevk
Copy link
Member

annevk commented Sep 7, 2016

Also, presumably you could have ASCII-only fast paths.

@rniwa
Copy link

rniwa commented Sep 10, 2016

I don't understand this. You'd have to perform the same name validation check for when creating a HTMLUnknownElement. The only thing custom element adds is checking uppercase ASCII and -, both of which are pretty cheap to perform.

@domenic domenic self-assigned this Sep 12, 2016
@domenic
Copy link
Member

domenic commented Feb 9, 2017

Let's close this pending any further data that shows it would be so beneficial as to be worth the breakage.

@domenic domenic closed this as completed Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: custom elements Relates to custom elements (as defined in DOM and HTML)
Development

No branches or pull requests

4 participants