Closed mlrawlings closed 4 months ago
match-media
Adds an additional guard to check if window.matchMedia exists
window.matchMedia
Prior version used process.browser. The window check will return true in environments that have window but aren't the browser (JSDOM, probably Deno)
process.browser
window
Scope
match-media
Description
Adds an additional guard to check if
window.matchMedia
existsMotivation and Context
Prior version used
process.browser
. Thewindow
check will return true in environments that havewindow
but aren't the browser (JSDOM, probably Deno)Screenshots (if appropriate):
Checklist: