1.0.1 • Published 8 years ago

@f/matches-selector v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

matches-selector

Build status Git tag NPM version Code style

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 Element
  • selector - Selector. E.g. :hover, .modal.

Returns: Boolean indicating whether or not node matched selector.

License

MIT