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

Merged
merged 1 commit into from Nov 20, 2012

Projects

None yet

2 participants

@scottjehl
Contributor

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 ?

Scott Jehl 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
497b82a
@toddparker
Contributor

@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 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