cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nikhi...@apache.org
Subject js commit: Added template-packaged WinJS reference for Windows 10 support. This closes #111
Date Wed, 13 May 2015 21:23:13 GMT
Repository: cordova-js
Updated Branches:
  refs/heads/master 53bacf736 -> f811f2c89


Added template-packaged WinJS reference for Windows 10 support. This
closes #111


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

Branch: refs/heads/master
Commit: f811f2c89e7d3dbda619176104cc32a0dbd20b82
Parents: 53bacf7
Author: Rob Paveza <Rob.Paveza@microsoft.com>
Authored: Tue May 12 11:34:56 2015 -0700
Committer: Nikhil Khandelwal <nikhilkh@microsoft.com>
Committed: Wed May 13 14:22:29 2015 -0700

----------------------------------------------------------------------
 src/windows/platform.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f811f2c8/src/windows/platform.js
----------------------------------------------------------------------
diff --git a/src/windows/platform.js b/src/windows/platform.js
index 2807505..defb8fa 100644
--- a/src/windows/platform.js
+++ b/src/windows/platform.js
@@ -50,7 +50,10 @@ module.exports = {
         if (!window.WinJS) {
             var scriptElem = document.createElement("script");
 
-            if (navigator.appVersion.indexOf("Windows Phone 8.1;") !== -1) {
+            if (navigator.appVersion.indexOf('MSAppHost/3.0') !== -1) {
+                // Windows 10 UWP
+                scriptElem.src = '/WinJS/js/WinJS.js';
+            } else if (navigator.appVersion.indexOf("Windows Phone 8.1;") !== -1) {
                 // windows phone 8.1 + Mobile IE 11
                 scriptElem.src = "//Microsoft.Phone.WinJS.2.1/js/base.js";
             } else if (navigator.appVersion.indexOf("MSAppHost/2.0;") !== -1) {


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


Mime
View raw message