4 ms·
I was about to answer you point by point, but it's probably not much use. The argument that I've made many times in this thread is that jQuery, built through i
by tambourine_man 7y ago
I was about to answer you point by point, but it's probably not much use.
The argument that I've made many times in this thread is that jQuery, built through iteration, feedback loop and with the benefit of hindsight is a better API than document.querySelectorAll() et al.
And there's no reason why we couldn't have used the former instead of the latter. Why would a library to “smooth over the differences” be needed for sel(".element") and not for document.querySelectorAll(".element") ?
No one was suggesting changing document.getElementById(), etc, so nothing would break.
DOM manipulation is not going anywhere, React and friends notwithstanding.
- inimino 7y agoIf your argument is that the method names in DOM should be shorter, then sure, I agree. It seemed to me you were arguing for something else. jQuery selectors are quite a bit different from querySelectorAll, among other things, they don't return native DOM objects, but rather jQuery objects, which have bizarre and unnecessary re-implementations of things (like .each) that have not been necessary in modern JS/DOM for about ten years now, so it's not so easy as "just use jQuery, but standardize it". If your argument was that the standardization process should have considered jQuery and other prior art, and taken good ideas from it, then of course that's exactly what happened.