enquire.js legacy support
问题 I'm trying to figure out what the best way to get enquire.js to work on legacy browsers (ie 6-9). On enquire's site, it says to use modernizr to check for matchMedia support, then load a polyfill if it's not supported. Modernizr.load([ //first test need for polyfill { test: window.matchMedia, nope: "/path/to/polyfill.js" }, //and then load enquire "/path/to/enquire.js" ]); Looking at the polyfill that it suggests, it says that modernizr already includes it with Modernizr.mq(). Used in: