Re:Gov.uk drops jQuery from their front end
by petre on Friday May 20, 2022 @12:17AM
(#31443297)
Fetch is fine but I'm not going to write document.querySelector every time I have to select some nodes, which happens quite often.
[ Parent
| on HN ]
Re:Gov.uk drops jQuery from their front end
by julianlam on Friday May 20, 2022 @12:32AM
(#31443368)
That's fine, pretty sure browsers alias $ and $$ to querySelector and querySelectorAll already (although I could be very wrong)
But speaking as someone who writes vanilla by default, it really really isn't as big an issue as you think it is.
I know. Most of its funtionality was superseeded by Js APIs which I already use (Promises vs Deferred, fetch vs. ajax). I might still need an alternative for building and editing query string parameters though. Plus most of the somewhat outdated libs in our project use it anyway.
Re:Gov.uk drops jQuery from their front end
by pwdisswordfish9 on Sunday May 22, 2022 @01:40AM
(#31465176)
> pretty sure browsers alias $ and $$ to querySelector and querySelectorAll already (although I could be very wrong)
You are wrong.