1.0.0 • Published 4 years ago
mediaquerylist.addeventlistener
Licence
MIT
Version
1.0.0
Deps
0
Size
2 kB
Vulns
0
Weekly
0
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