3 ms·
> I haven't dug into the code, but doesn't jQuery already use native methods like querySelectorAll where available? Yes. But it still has quite a bit of overhe
by masklinn 15y ago
> I haven't dug into the code, but doesn't jQuery already use native methods like querySelectorAll where available?
Yes. But it still has quite a bit of overhead as it also handles non-standard selectors (implemented in javascript), things like :input.
> I guess if all you need is to query the document and you know your target audience is running a modern browser... then sure, save yourself 31k :)
If you've got an ever more restricted target audience, you can also use things like Zepto (webkit-only, jQuery's interface in 7k)