Don't use window and document
With this change, our JavaScript can also be executed by non-brower engines.
This commit is contained in:
@@ -16,6 +16,6 @@ ol.BrowserFeature = {
|
||||
* @type {boolean}
|
||||
*/
|
||||
HAS_TOUCH: ol.ASSUME_TOUCH ||
|
||||
(document && 'ontouchstart' in document.documentElement) ||
|
||||
!!(window.navigator.msPointerEnabled)
|
||||
(goog.global.document && 'ontouchstart' in document.documentElement) ||
|
||||
!!(goog.global.navigator.msPointerEnabled)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user