Skip to content

A polyfill for MediaQueryList.prototype.addEventListener

License

Notifications You must be signed in to change notification settings

cometkim/mediaquerylist.addeventlistener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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, So we may still need polyfill to follow the standard :/

Usage (via NPM)

yarn add mediaquerylist.addeventlistener

then import it from your entry script file.

import 'mediaquerylist.addeventlistener/polyfill';

Usage (via unpkg)

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

LICENSE

MIT

About

A polyfill for MediaQueryList.prototype.addEventListener

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published