News for hackers. Stuff that matters.
Re:I loved jQuery, and still do (2019) by spiralx on Tuesday June 29, 2021 @02:48PM (#27680086)
Apart from the historical reasons both `getElementsByClassName` and especially `getElementById` are optimised - the latter being a simple lookup - which I'm not sure `querySelectorAll` is able to take advantage of.
Re:I loved jQuery, and still do (2019) by setr on Tuesday June 29, 2021 @04:18PM (#27681188)
You’d pay the cost of parsing every time, but otherwise I’d expect SelectorAll to directly depend on getElementBy.. as relevant