cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [2/8] js commit: CB-9342 Fix deviceReady event not fired on Windows 10 in hosted environment
Date Fri, 28 Aug 2015 22:55:35 GMT
CB-9342 Fix deviceReady event not fired on Windows 10 in hosted environment


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/5fdee87b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/5fdee87b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/5fdee87b

Branch: refs/heads/4.1.x
Commit: 5fdee87b2814bdafb9126f09bdb95f255db25d42
Parents: 6950f96
Author: daserge <daserge@yandex.ru>
Authored: Wed Aug 12 16:40:59 2015 +0300
Committer: daserge <daserge@yandex.ru>
Committed: Wed Aug 12 16:41:15 2015 +0300

----------------------------------------------------------------------
 src/cordova.js   | 4 +++-
 src/cordova_b.js | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5fdee87b/src/cordova.js
----------------------------------------------------------------------
diff --git a/src/cordova.js b/src/cordova.js
index 70757fd..b2d2a55 100644
--- a/src/cordova.js
+++ b/src/cordova.js
@@ -19,7 +19,9 @@
  *
 */
 
-if(window.cordova){
+// Workaround for Windows 10 in hosted environment case
+// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object
+if (window.cordova && !(window.cordova instanceof HTMLElement)) {
     throw new Error("cordova already defined");
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5fdee87b/src/cordova_b.js
----------------------------------------------------------------------
diff --git a/src/cordova_b.js b/src/cordova_b.js
index 359fb4a..a66a106 100644
--- a/src/cordova_b.js
+++ b/src/cordova_b.js
@@ -19,7 +19,9 @@
  *
 */
 
-if(window.cordova){
+// Workaround for Windows 10 in hosted environment case
+// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object
+if (window.cordova && !(window.cordova instanceof HTMLElement)) {
     throw new Error("cordova already defined");
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message