3 ms·
Regarding the bugs, what makes it more of a problem in HTML attributes than with any other code?
by blowski 4y ago
Regarding the bugs, what makes it more of a problem in HTML attributes than with any other code?
- rglover 4y agoNothing makes it more of a problem. Same as any other code. Just the idea of introducing non-standard things (especially if used inconsistently) increases the likelihood that things will break and be harder to fix. For example, if someone binds an event listener to an element in two different places with something like clicker="button" in one place and then uses data-clickable="true" in another place, it can introduce confusion. Not only does the original developer have to remember all of their custom attributes but so does anybody else who comes on to the project.