chi-matches

0.0.1 • Public • Published

chi-matches

Build Status Dependency Status

Check if a DOM element matches a CSS selector.

A cross-browser wrapper for the Element#matches function. It will choose the appropriate native method (including vendor prefixes) to use.

This module uses Node.js-style modules, for best results use browserify.

Example

var matches = require('chi-matches');
 
var div = document.createElement('div');
matches(div, 'div'); // true
matches(div, 'p'); // false

Readme

Keywords

none

Package Sidebar

Install

npm i chi-matches

Weekly Downloads

19

Version

0.0.1

License

BSD

Last publish

Collaborators

  • conradz