Is there any advantage to using querySelector()
vs jQuery's $()
in a userscript? I want the script to work in all major browsers that support userscripts, so I'm especially interested in cross-browser compatibility.
I started to wonder about this because I noticed honestbleeps' excellent Reddit Enhancement Suite includes jQuery as a dependency, but mostly sticks to querySelector()
for selecting elements and other basic JavaScript methods for DOM manipulation.
Is it just a matter of taste, or is there a reason to keep jQuery use to a minimum?