polyfills icon indicating copy to clipboard operation
polyfills copied to clipboard

[Custom Elements] Custom elements tag names

Open boikovdv opened this issue 7 years ago • 2 comments

Not all characters allowed in element tagName When custom element register its name checking by regexp /^[a-z][.0-9_a-z]-[-.0-9_a-z]$/

HTML Living Standard define more complex names for custom elements:

A valid custom element name is a sequence of characters name that meets all of the following requirements:

name must match the PotentialCustomElementName production:

PotentialCustomElementName ::= [a-z] (PCENChar)* '-' (PCENChar)* PCENChar ::= "-" | "." | [0-9] | "_" | [a-z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]

link: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name

boikovdv avatar Jan 10 '19 14:01 boikovdv

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 12 '20 02:06 stale[bot]

This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!

stale[bot] avatar Jun 23 '22 05:06 stale[bot]