0.0.2 • Published 7 years ago

@readable/closest v0.0.2

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

Closest Polyfill

IE-9+ Firefox-34+ chrome-34+ Safari-8+ Opera-21+

Simpler and faster Element.closest polyfill that relies on Element.matches instead of falling back to document.querySelectorAll (like suggested on MDN) or some other selector match implementation.

The tradeoff is no support for ancient browsers.

Install

npm install --save @readable/closest
<script src="node_modules/@readable/closest/closest.js"></script>