0.0.2 • Published 7 years ago
@readable/closest v0.0.2
Closest Polyfill
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>