r/javascript • • Aug 21 '18

Effectively supported in all browsers, JavaScript has its own form of media queries just like CSS.

https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
465 Upvotes

114 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Aug 22 '18

[deleted]

-2

u/esr360 Aug 22 '18

Question whatever you want, but the fact is I've been benefiting from this API for years already and will continue to benefit from it for years to come. I don't know what else to tell you.

0

u/[deleted] Aug 22 '18

[deleted]

2

u/esr360 Aug 22 '18

And I understand that. But when this has been working as expected for years already and has full support on caniuse, I'm suggesting that in this particular case the risk is very much worth it, because it's an extremely useful API.