For what I know, Sizzle and querySelector/querySelectorAll
are CSS selectors.
So... What is the difference between loading Sizzle and doing:
Sizzle("my CSS query")
and
document.querySelectorAll("my CSS query")
Also, I am aware that Sizzle returns an array of an element while querySelectorAll returns a NodeList (in most browsers). I am also aware that you need to load Sizzle and that you can use document.querySelector
for only one element.
So is there any other difference in performance?
EDIT: My question is only about the Sizzle selector engine (and querySelectorAll
). Please do not involve jQuery.