Element.matches

bool matches(string selector) @scriptable

If the element matches the given selector. Previously known as matchesSelector.