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 match
mqOrientation.addListener(function() { self.handleViewportChange(); });

 

posted @ 2014-11-28 17:17  evilfox  阅读(216)  评论(0编辑  收藏  举报