An open API service indexing awesome lists of open source software.

https://github.com/cometkim/mediaquerylist.addeventlistener

A polyfill for MediaQueryList.prototype.addEventListener
https://github.com/cometkim/mediaquerylist.addeventlistener

Last synced: 11 months ago
JSON representation

A polyfill for MediaQueryList.prototype.addEventListener

Awesome Lists containing this project

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

```

## LICENSE

MIT