5 ms·
Why did you choose to use a custom attribute rather than a `data-` one?
by whostolemyhat 10y ago
Why did you choose to use a custom attribute rather than a `data-` one?
- carsongross 10y agoI like how custom attributes look better, when I saw how Angular was using them. You can use the data-prefix though if you want by including the following meta tag: <meta name="intercoolerjs:use-data-prefix" content="true"/>
- whostolemyhat 10y agoI know it's largely hypothetical, but by not using data-, aren't you running the risk of namespace collisions in future? data- attributes are guaranteed not to ever have an 'official' version that the browser expects, while anything else may exist in the future.