Re:Native equivalents of jQuery functions
by jamesaguilar on Monday May 20, 2013 @11:12AM
(#5738069)
What I'm curious about is, if these are equivalent, why doesn't JQuery just delegate to them in browsers where it is supported? Then you can get both the speed and the compatibility.
[ Parent
| on HN ]
In the case of querySelectorAll, it does[1] (after performing some checks for easy wins) and if this test[2] is anything to go by, it can actually perform better in some cases.
[1] https://github.com/jquery/sizzle/blob/master/sizzle.js#L237