blowfish/node_modules/desandro-matches-selector
2023-01-29 22:30:24 +00:00
..
.npmignore config redirect 2023-01-29 22:30:24 +00:00
bower.json config redirect 2023-01-29 22:30:24 +00:00
matches-selector.js config redirect 2023-01-29 22:30:24 +00:00
package.json config redirect 2023-01-29 22:30:24 +00:00
README.md config redirect 2023-01-29 22:30:24 +00:00
tests.html config redirect 2023-01-29 22:30:24 +00:00
tests.js config redirect 2023-01-29 22:30:24 +00:00

matchesSelector helper

matches/matchesSelector is pretty hot 🔥, but has vendor-prefix baggage 👜 👝. This helper function takes care of that, without polyfilling or augmenting Element.prototype.

matchesSelector( elem, selector );
// for example
matchesSelector( myElem, 'div.my-hawt-selector' );

Install

Download matches-selector.js

Install with Bower: bower install matches-selector

Install with npm: npm install desandro-matches-selector

Browser support

IE10+, all modern browsers

Use matchesSelector v1 for IE8 and IE9 support.

MIT license

matchesSelector is released under the MIT license