Web platform features explorer

matchMedia

Widely available since 2018-01-29
Tags: api

The window.matchMedia() method checks whether a media query applies to the document.

Learning resources on MDN

Browser support (view on caniuse.com)