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.this

var mqOrientation = window.matchMedia("(orientation: portrait)");

// The Listener will fire whenever this either matches or ceases to match
mqOrientation.addListener(function() { self.handleViewportChange(); });
相關文章
相關標籤/搜索