Is there any way to test if a selector would match a given DOM Element? Preferably, without the use of an external library like Sizzle. This is for a library and I would li
Modern browsers can do it with the document.querySelectorAll function.
document.querySelectorAll
http://www.w3.org/TR/selectors-api/