# mediaquerylist.addeventlistener

> `MediaQueryList.prototype.addListener` and `MediaQueryList.prototype.removeListener` is deprecated and no longer recommended.

Latest version **1.0.0** (published 2022-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install mediaquerylist.addeventlistener
pnpm add mediaquerylist.addeventlistener
yarn add mediaquerylist.addeventlistener
bun add mediaquerylist.addeventlistener
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-04-27 |
| First published | 2022-04-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | cometkim |

## Links

- npm: https://www.npmjs.com/package/mediaquerylist.addeventlistener
- npm.io page: https://npm.io/package/mediaquerylist.addeventlistener

## Recent versions

- 1.0.0 (latest) — 2022-04-27

## README

# MediaQueryList.prototype.addEventListener Polyfill

`MediaQueryList.prototype.addListener` and `MediaQueryList.prototype.removeListener` is deprecated and no longer recommended.

Instead, the standard supports it as same mechanism as `EventTarget.addEventListener`.

But [`MediaQueryList.prototype.addEventListener` is supported since Safari 14](https://caniuse.com/mdn-api_mediaquerylist), So we may still need polyfill to follow the standard :/

## Usage (via NPM)

```bash
yarn add mediaquerylist.addeventlistener
```

then import it from your entry script file.

```js
import 'mediaquerylist.addeventlistener/polyfill';
```

## Usage (via unpkg)

```html
<script src="https://unpkg.com/mediaquerylist.addeventlistener@1.0.0/polyfill.js"></script>
```

## LICENSE

MIT

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