DEV Community

Discussion on: Who still regularly uses jQuery?

Collapse
 
aimerib profile image
Aimeri Baddouh

I saw a talk by Wes Bos at JAMstack conf where he did exactly this. Actually he implemented $ for querySelector and $$ for querySelectorAll

I think this is a pretty neat trick, but there's a part of me that always wants to pause and analyze whether it is strictly necessary to expand on the window object needlessly. Do you have any opinions on setting this as a part of the window object vs using a separate function to do this?