4 ms·
you can use a data attribute if you want, data-script="on click log 'yay'" i don't have strong opinions on that, i've been told by people who work on the brows
by recursivedoubts 3y ago
you can use a data attribute if you want, data-script="on click log 'yay'"
i don't have strong opinions on that, i've been told by people who work on the browsers that, from a practical perspective, custom non-data attributes are supported and always will be, and the underscore attribute is a tribute to underscore.js, a library I always liked.
- err4nt 3y agoSome thoughts: Browser developers today can't speak for the way browser makers in the future may build standards-based browsers. Standards provide a level of future-proofing. Also browsers are not the only tools developers will use to interact with HTML. And most importantly, the custom extensibility built-in to the HTML language is supported by all browsers as well.
- recursivedoubts 3y agoyep i get it, you can use data attributes if you want, but i've been told by high ups on both the chrome team and the edge team that it doesn't matter i am not ideological about it