matchmedia.js 600 B

12345678910111213141516171819202122232425
  1. /*!
  2. {
  3. "name": "matchMedia",
  4. "property": "matchmedia",
  5. "caniuse": "matchmedia",
  6. "tags": ["matchmedia"],
  7. "authors": ["Alberto Elias"],
  8. "notes": [{
  9. "name": "W3C Spec",
  10. "href": "https://drafts.csswg.org/cssom-view/#the-mediaquerylist-interface"
  11. }, {
  12. "name": "MDN Docs",
  13. "href": "https://developer.mozilla.org/en-US/docs/Web/API/Window.matchMedia"
  14. }],
  15. "polyfills": ["matchmediajs"]
  16. }
  17. !*/
  18. /* DOC
  19. Detects support for matchMedia.
  20. */
  21. define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
  22. Modernizr.addTest('matchmedia', !!prefixed('matchMedia', window));
  23. });