custom-attributes icon indicating copy to clipboard operation
custom-attributes copied to clipboard

require hyphens in custom attribute names?

Open trusktr opened this issue 5 years ago • 3 comments

The DOM already has global attributes and it may want to reserve the no-hyphen space for future builtins.

Any thoughts on this?

trusktr avatar Dec 28 '19 07:12 trusktr

Maybe, but also keep in mind that people regularly use non-hyphenated attributes on their own custom elements.

matthewp avatar Dec 30 '19 12:12 matthewp

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.

wessberg avatar Jun 28 '21 21:06 wessberg

My opinion has changed here over time and I think I agree now (with requiring a hyphen)

matthewp avatar Jul 14 '21 14:07 matthewp