3 ms·
Custom attributes are used since many years now and work on every browsers. Maybe the spec should be updated to reflect the usage.
by tarsinge 6y ago
Custom attributes are used since many years now and work on every browsers. Maybe the spec should be updated to reflect the usage.
- err4nt 6y agoCustom attributes (without data-*) are invalid HTML unless you're using them on a custom HTML element. If you're defining a custom element, you're responsible for defining what its attributes mean - outside of that, no they aren't allowed and yes they are unsafe to use, and restrict the standards bodies from being able to move forward freely without risking breaking the web because of invalid code in the wild.