Re: [whatwg/dom] Valid/Invalid characters in document.createElement() (#849)

Here is the reporter of the Chromium issue mentioned above. Just wanted to note that removing the character range `[#x10000-#xEFFFF]` from the name production rules would create a discrepancy with the HTML rules for [custom element names](https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name), where that range is included. That would consolidate the inconsistent behavior observed in current versions of Chrome and Firefox where you are allowed to register an element with an Emoji in its name but not to create it.

```js
customElements.define("emotion-😍", TestElement); // OK
document.createElement("emotion-😍"); // Allowed per spec, error in Chrome and Firefox
```

So if the consense is that supplementary Unicode characters should be banned, I would recommend to also change the HTML rules accordingly.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/849#issuecomment-600305559

Received on Tuesday, 17 March 2020 21:17:10 UTC