Test whether an element matches a CSS selector.
The element of interest.
The valid CSS selector of interest.
true if the element is a match, false otherwise.
true
false
This function uses the builtin browser capabilities when possible, falling back onto a document query otherwise.
Test whether an element matches a CSS selector.