From 4666f6467365832e87f649b5172e8f47d77e3ca6 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 19 Sep 2013 15:03:15 +0200 Subject: [PATCH] Use goog.global instead of window See f1f319d6ada50d13774e24b7492a812fb7a727ac --- src/ol/deviceorientation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/deviceorientation.js b/src/ol/deviceorientation.js index 72b5bb5e18..0a3392bb00 100644 --- a/src/ol/deviceorientation.js +++ b/src/ol/deviceorientation.js @@ -105,7 +105,7 @@ ol.DeviceOrientation.prototype.disposeInternal = function() { * @const * @type {boolean} */ -ol.DeviceOrientation.SUPPORTED = 'DeviceOrientationEvent' in window; +ol.DeviceOrientation.SUPPORTED = 'DeviceOrientationEvent' in goog.global; goog.exportProperty( ol.DeviceOrientation, 'SUPPORTED', @@ -220,7 +220,7 @@ ol.DeviceOrientation.prototype.handleTrackingChanged_ = function() { if (ol.DeviceOrientation.SUPPORTED) { var tracking = this.getTracking(); if (tracking && goog.isNull(this.listenerKey_)) { - this.listenerKey_ = goog.events.listen(window, 'deviceorientation', + this.listenerKey_ = goog.events.listen(goog.global, 'deviceorientation', this.orientationChange_, false, this); } else if (!tracking && !goog.isNull(this.listenerKey_)) { goog.events.unlistenByKey(this.listenerKey_);