for internal review: updated our $.mobile.media function #5233

Merged
merged 1 commit into from Nov 20, 2012

Conversation

Projects
None yet
2 participants
Contributor

scottjehl commented Oct 29, 2012

updated our $.mobile.media function to use the matchMedia polyfill, which defers to the native function where possible. $.mobile.media still returns a boolean as it always has, but now, window.matchMedia is exposed in unsupporting environments too, which gives developers access to its standard API that returns an object, and in native implementations, supports listeners as well (a polyfill is available for that part too). This addresses issue #4979

Care to take a look, @johnbender ?

updated our $.mobile.media function to use the matchMedia polyfill, w…
…hich defers to the native function where possible. $.mobile.media still returns a boolean as it always has, but now, window.matchMedia is exposed in unsupporting environments too, which gives developers access to its standard API that returns an object, and in native implementations, supports listeners as well (a polyfill is available for that part too). This addresses issue #4979
Contributor

toddparker commented Nov 18, 2012

@scottjehl - if there isn't any negative impact to landing this (and test pass), let's do that. Seems like it works as it does currently but leverages native when possible, right?

scottjehl pushed a commit that referenced this pull request Nov 20, 2012

Merge pull request #5233 from jquery/mobile-media-refactor
Updated our $.mobile.media function to match the current window.matchMedia specification. As a result, no changes will occur in the input/output of $.mobile.media, but this does expose a polyfill of window.matchMedia in non-supporting browsers that support media queries. fixes #4979

@scottjehl scottjehl merged commit 555e07a into master Nov 20, 2012

@jaspermdegroot jaspermdegroot deleted the mobile-media-refactor branch Jan 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment