custom-attributes
custom-attributes copied to clipboard
require hyphens in custom attribute names?
The DOM already has global attributes and it may want to reserve the no-hyphen space for future builtins.
Any thoughts on this?
Maybe, but also keep in mind that people regularly use non-hyphenated attributes on their own custom elements.
I personally think Custom Attribute names should follow the same syntactical and semantic rules as for Custom Element names, considering that is something that will most likely otherwise cause concern among implementers, if Custom Attributes eventually evolve into a proposal for a new Web API.
My opinion has changed here over time and I think I agree now (with requiring a hyphen)