You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/10/22 22:40:58 UTC

[1/2] js commit: Pull in InAppBrowser.js changes from cordova-plugin-inappbrowser@aa81c3267a5b1c337b09933ff5ceb06a93f9dbb7

Updated Branches:
  refs/heads/2.9.x af4bcf4b4 -> f911603c6


Pull in InAppBrowser.js changes from cordova-plugin-inappbrowser@aa81c3267a5b1c337b09933ff5ceb06a93f9dbb7


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

Branch: refs/heads/2.9.x
Commit: da697377ab73ec62c75c0ea240d5878c9474c872
Parents: af4bcf4
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Oct 22 16:39:24 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Oct 22 16:39:24 2013 -0400

----------------------------------------------------------------------
 lib/common/plugin/InAppBrowser.js | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/da697377/lib/common/plugin/InAppBrowser.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/InAppBrowser.js b/lib/common/plugin/InAppBrowser.js
index 5da53fd..3fe9261 100644
--- a/lib/common/plugin/InAppBrowser.js
+++ b/lib/common/plugin/InAppBrowser.js
@@ -22,6 +22,7 @@
 var exec = require('cordova/exec');
 var channel = require('cordova/channel');
 var modulemapper = require('cordova/modulemapper');
+var urlutil = require('cordova/urlutil');
 
 function InAppBrowser() {
    this.channels = {
@@ -30,6 +31,7 @@ function InAppBrowser() {
         'loaderror' : channel.create('loaderror'),
         'exit' : channel.create('exit')
    };
+   this._alive = true;
 }
 
 InAppBrowser.prototype = {
@@ -39,7 +41,10 @@ InAppBrowser.prototype = {
         }
     },
     close: function (eventname) {
-        exec(null, null, "InAppBrowser", "close", []);
+        if (this._alive) {
+            this._alive = false;
+            exec(null, null, "InAppBrowser", "close", []);
+        }
     },
     show: function (eventname) {
       exec(null, null, "InAppBrowser", "show", []);
@@ -77,17 +82,18 @@ InAppBrowser.prototype = {
 };
 
 module.exports = function(strUrl, strWindowName, strWindowFeatures) {
-    var iab = new InAppBrowser();
-    var cb = function(eventname) {
-       iab._eventHandler(eventname);
-    };
-
     // Don't catch calls that write to existing frames (e.g. named iframes).
     if (window.frames && window.frames[strWindowName]) {
         var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open');
         return origOpenFunc.apply(window, arguments);
     }
 
+    strUrl = urlutil.makeAbsolute(strUrl);
+    var iab = new InAppBrowser();
+    var cb = function(eventname) {
+       iab._eventHandler(eventname);
+    };
+
     exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
     return iab;
 };


[2/2] js commit: Update VERSION to 2.9.1-dev

Posted by ag...@apache.org.
Update VERSION to 2.9.1-dev


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

Branch: refs/heads/2.9.x
Commit: f911603c67c1df4701013b54f8b4d4b6cdc3de23
Parents: da69737
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Oct 22 16:40:36 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Oct 22 16:40:36 2013 -0400

----------------------------------------------------------------------
 VERSION | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f911603c/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index c8e38b6..ee57e1e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.9.0
+2.9.1-dev