UI Deploy

Curated, Short, Web UI Dev we Love.

Follow-up: Don't use class names to find HTML elements with JS

This is the follow-up to "Don't use class names to find HTML elements with JS", where we take a look at a new test case, with results proving that the negative speed impact of finding elements by data attribute instead of by class name is negligible. The reasons for using this approach are in the original post and still current. If you just don't like the concept, there's no way I can persuade you. But if it's about the numbers, here are the metrics.

view source

Advertisement