首页 > 代码库 > Firefox mobile (android) and orientationchange

Firefox mobile (android) and orientationchange

Firefox for Android does not support the orientationchange event but you can achieve the same result by using media query listeners.

var mqOrientation = window.matchMedia("(orientation: portrait)");// The Listener will fire whenever this either matches or ceases to matchmqOrientation.addListener(function() { self.handleViewportChange(); });

 

Firefox mobile (android) and orientationchange