As far as I can tell, with the help of caniuse, window.matchMedia
is supported on most popular browsers, with the exception of IE<10 (which are, admittedly not wildly popular these days).
Would any one know whether non-supporting browsers, such as IE<10, have much of a presence on mobile platforms?
This will help me to make a pragmatic decision for a polyfill I am writing. That is, if matchMedia()
is not supported, then it’s probably a desktop browser, and we can take it from there.
Thanks