@f/matches-selector
v1.0.1
Published
Polyfill for Element.prototype.matches
Downloads
3
Readme
matches-selector
Polyfill for Element.prototype.matches
Installation
$ npm install @f/matches-selector
Usage
var matchesSelector = require('@f/matches-selector')
if (matchesSelector(':hover"'))
API
matchesSelector(node, selector)
node
- DOM Elementselector
- Selector. E.g.:hover
,.modal
.
Returns: Boolean indicating whether or not node
matched selector
.
License
MIT