Will using data attributes affect application performance?

I plan to use data attributes to identify elements in the DOM for test cases of selenium. Will using attributes affect application performance?

+3
source share
1 answer

Not at all, you'll be fine using attributes data-*. However, it should be noted that using syntax is $.data(theInput, 'someData');much faster than using syntax theInput.data('someData');, as shown in this jsPerf .

+4
source

All Articles