-
Notifications
You must be signed in to change notification settings - Fork 1
matches
Toke Voltelen edited this page Dec 3, 2016
·
3 revisions
Determines whether or not a HTML Element matches a given CSS selector
-
elm
(HTMLElement) - HTML Element to test -
selector
- CSS selectorelm
should match -
returns (Boolean) - Whether or not
elm
matched the selector
import matches from 'vanillajs-helpers/matches';
matches(element, '#someId .some-class') // -> true