polyfills/matchMedia

Interfaces

MediaQueryListPolyfill

Polyfill of the "MediaQueryList" object. Does not currently support events.

Methods

(inner) matchMedia(rule) → {MediaQueryListPolyfill}

Polyfill for the "matchMedia" built-in. Does not currently support events.

Example
const {media, matches} = viewstat.polyfills.matchMedia("(min-height: 500px)");
console.log( media ) // "(min-height: 500px)"
console.log( matches ) // true or false
Parameters:
Name Type Description
rule string

media query to match

Returns:
Type
MediaQueryListPolyfill