Re: [webcomponents] [Custom]: "are" custom element names ASCII characters, or MUST they be ASCII characters? (#239)

I tend to agree with @rniwa that a restriction to ASCII letters in v1 makes sense. On the other hand, I was about to say "we could wait until developers ask for an expanded set and add them in the future", but then I realized @notwaldorf in this thread is a developer doing exactly that. So maybe we should be more permissive.

GIven how XML is a mess and I'd probably make document.defineElement just always fail in XML documents if I could, how about the following?

- If context object is an XML document, validate that it contains a hyphen and only [a-zA-Z0-9]. (Should we disallow uppercase too?)
- If context object is a HTML document, validate that:
  - It matches https://www.w3.org/TR/xml/#NT-Name (createElement restriction)
  - It either contains a hyphen, or contains a code point above 0xFF

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/239#issuecomment-191250157

Received on Wednesday, 2 March 2016 14:09:27 UTC