You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/11/01 23:09:19 UTC

[23/58] [abbrv] git commit: fixes ChildBrowser and Facebook plugins issues

fixes ChildBrowser and Facebook plugins issues


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

Branch: refs/heads/master
Commit: cf495c61cf71258957bd5a6979cc717cfee417b3
Parents: d2b1db9
Author: sgrebnov <se...@gmail.com>
Authored: Fri Oct 26 15:20:44 2012 +0400
Committer: sgrebnov <se...@gmail.com>
Committed: Fri Oct 26 15:20:44 2012 +0400

----------------------------------------------------------------------
 plugins/www/plugins/ChildBrowser/ChildBrowser.js |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp8/blob/cf495c61/plugins/www/plugins/ChildBrowser/ChildBrowser.js
----------------------------------------------------------------------
diff --git a/plugins/www/plugins/ChildBrowser/ChildBrowser.js b/plugins/www/plugins/ChildBrowser/ChildBrowser.js
index 569f13b..ce1cbdb 100644
--- a/plugins/www/plugins/ChildBrowser/ChildBrowser.js
+++ b/plugins/www/plugins/ChildBrowser/ChildBrowser.js
@@ -11,7 +11,10 @@ function ChildBrowser() {
 // called from native
 ChildBrowser._onLocationChange = function(newLoc)
 {
-  window.plugins.childBrowser.onLocationChange(newLoc);
+    // if there is event handler attached
+    if (typeof window.plugins.childBrowser.onLocationChange !== 'undefined') {
+        window.plugins.childBrowser.onLocationChange(newLoc);
+    }    
 };
 
 // Callback when the user chooses the 'Done' button
@@ -73,7 +76,7 @@ ChildBrowser.prototype.showWebPage = function(loc,geolocationEnabled)
 // close the browser, will NOT result in close callback
 ChildBrowser.prototype.close = function()
 {
-  Cordova.exec(null,null,"ChildBrowserCommand","close");
+  Cordova.exec(null,null,"ChildBrowserCommand","close", {});
 };
 
 // Not Implemented