r/javascript • u/[deleted] • 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
r/javascript • u/[deleted] • Aug 21 '18
17
u/senocular Aug 21 '18
Its in draft form currently: https://www.w3.org/TR/cssom-view-1/ So "standard" is a little bit of a stretch (in that its current form has not been formally standardized). The MDN page for MediaQueryList tags this as "This is an experimental technology" as well, so its understandable why this wouldn't necessarily be in widespread use.