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 2013/02/15 01:41:51 UTC

[2/5] git commit: Events were wrong, not fired correctly

Events were wrong, not fired correctly


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

Branch: refs/heads/master
Commit: f3547e1fa9e4933efcd4921af9dd57fccb60ab52
Parents: afd0ebd
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Feb 14 12:26:54 2013 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Feb 14 12:26:54 2013 -0800

----------------------------------------------------------------------
 .../standalone/cordovalib/Commands/InAppBrowser.cs |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/f3547e1f/templates/standalone/cordovalib/Commands/InAppBrowser.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/Commands/InAppBrowser.cs b/templates/standalone/cordovalib/Commands/InAppBrowser.cs
index fc7769c..c91b1ab 100644
--- a/templates/standalone/cordovalib/Commands/InAppBrowser.cs
+++ b/templates/standalone/cordovalib/Commands/InAppBrowser.cs
@@ -228,6 +228,10 @@ namespace WPCordovaClassLib.Cordova.Commands
                         }
                     }
                     browser = null;
+                    string message = "{\"type\":\"exit\"}";
+                    PluginResult result = new PluginResult(PluginResult.Status.OK, message);
+                    result.KeepCallback = false;
+                    this.DispatchCommandResult(result);
                 });
             }
         }
@@ -240,7 +244,7 @@ namespace WPCordovaClassLib.Cordova.Commands
                 fwdButton.IsEnabled = browser.CanGoForward;
 
             }
-            string message = "{\"type\":\"locationChanged\", \"location\":\"" + e.Uri.AbsoluteUri + "\"}";
+            string message = "{\"type\":\"loadstop\", \"url\":\"" + e.Uri.AbsoluteUri + "\"}";
             PluginResult result = new PluginResult(PluginResult.Status.OK, message);
             result.KeepCallback = true;
             this.DispatchCommandResult(result);
@@ -248,7 +252,7 @@ namespace WPCordovaClassLib.Cordova.Commands
 
         void browser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
         {
-            string message = "{\"type\":\"navigationError\",\"location\":\"" + e.Uri.AbsoluteUri + "\"}";
+            string message = "{\"type\":\"error\",\"url\":\"" + e.Uri.AbsoluteUri + "\"}";
             PluginResult result = new PluginResult(PluginResult.Status.ERROR, message);
             result.KeepCallback = true;
             this.DispatchCommandResult(result);
@@ -256,7 +260,7 @@ namespace WPCordovaClassLib.Cordova.Commands
 
         void browser_Navigating(object sender, NavigatingEventArgs e)
         {
-            string message = "{\"type\":\"locationAboutToChange\",\"location\":\"" + e.Uri.AbsoluteUri + "\"}";
+            string message = "{\"type\":\"loadstart\",\"url\":\"" + e.Uri.AbsoluteUri + "\"}";
             PluginResult result = new PluginResult(PluginResult.Status.OK, message);
             result.KeepCallback = true;
             this.DispatchCommandResult(result);