Closed e1himself closed 7 years ago
Fallback to native MS- prefixed implementation of matchMedia() if possible.
Otherwise it doesn't work well with Modernizr: Modernizr.matchmedia checks if prefixed version exists and thus returns true, while window.matchMedia is not there.
Modernizr.matchmedia
window.matchMedia
Also see https://github.com/Modernizr/Modernizr/commit/b9cc2d40725f9aac01412c74be6f83ec415a2734
This library expects that matchMedia has been patched/polyfilled in unsupported environments, and so the issue is not here
Fallback to native MS- prefixed implementation of matchMedia() if possible.
Otherwise it doesn't work well with Modernizr:
Modernizr.matchmedia
checks if prefixed version exists and thus returns true, whilewindow.matchMedia
is not there.Also see https://github.com/Modernizr/Modernizr/commit/b9cc2d40725f9aac01412c74be6f83ec415a2734