# element-closest-polyfill

> A minimal polyfill for Element.closest

Latest version **1.0.7** (published 2023-11-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install element-closest-polyfill
pnpm add element-closest-polyfill
yarn add element-closest-polyfill
bun add element-closest-polyfill
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2023-11-18 |
| First published | 2019-03-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Maintainers | idmadj |
| Keywords | element, closest, css, polyfill, microsoft, ie, msie, npm, package |

## Links

- npm: https://www.npmjs.com/package/element-closest-polyfill
- Repository: https://github.com/idmadj/element-closest-polyfill
- Homepage: https://github.com/idmadj/element-closest-polyfill#readme
- Issues: https://github.com/idmadj/element-closest-polyfill/issues
- npm.io page: https://npm.io/package/element-closest-polyfill

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.7 (latest) — 2023-11-18
- 1.0.6 — 2023-01-09
- 1.0.5 — 2022-03-30
- 1.0.4 — 2021-05-30
- 1.0.3 — 2021-05-30
- 1.0.2 — 2020-08-03
- 1.0.1 — 2020-08-03
- 1.0.0 — 2019-03-02

## README

# element-closest-polyfill
[![npm](https://img.shields.io/npm/v/element-closest-polyfill.svg)](https://www.npmjs.com/package/element-closest-polyfill)
![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/element-closest-polyfill.svg)

A minimal polyfill for [`Element.closest()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/closest) and [`Element.matches()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/matches), using MDN's implementation. Mostly meant for Microsoft IE9+.

## Install
```sh
$ npm install --save element-closest-polyfill
```

## Usage
Pick your favorite:
```js
require("element-closest-polyfill");
```
```js
import 'element-closest-polyfill';
```

---
_Source: https://npm.io/package/element-closest-polyfill · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
