But I agree I would not use jQuery in new project and when possible I would replace jQuery in existing code too.
But I agree I would not use jQuery in new project and when possible I would replace jQuery in existing code too.
This is still an ecosystem without a standard library and with no consistent design style/layout. It is janky and bad. It being "less bad than it used to be" isn't the shiny endorsement that everyone thinks it is.
It’s frustrating when people reject a good tool like jQuery, with the argument that the same functionality can be achieved with just vanilla JS.
This has worked for many years. I typically add a shorthand $ for the QSA part and on projects where I used to support IE11 you could add Array.from there but I haven’t bothered since IE was deprecated. jQuery does more but some of those things had performance impacts which were worth thinking about and the combo of QSA and fetch took care about about 90% of my projects.
document.querySelectorAll("div").forEach(i => i.innerText = "test")
>An HTMLCollection in the HTML DOM is live; it is automatically updated when the underlying document is changed. For this reason it is a good idea to make a copy (eg. using Array.from) to iterate over if adding, moving, or removing nodes.
So you need something that will also be efficient and correct, not a 5 minutes implementation.
It seems this only pertains specifically to overwriting the __proto__ of an existing object (the is the prototype of other things).