You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2014/04/25 20:14:28 UTC
[07/10] git commit: CB-6482 InAppBrowser calls incorrect callback on
WP8
CB-6482 InAppBrowser calls incorrect callback on WP8
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/ab7494fa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/ab7494fa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/ab7494fa
Branch: refs/heads/master
Commit: ab7494faa059a8e90fb8f88c5c5ef40e8a154478
Parents: e282cc9
Author: sgrebnov <v-...@microsoft.com>
Authored: Mon Apr 21 15:28:03 2014 -0700
Committer: sgrebnov <v-...@microsoft.com>
Committed: Mon Apr 21 15:28:03 2014 -0700
----------------------------------------------------------------------
src/wp/InAppBrowser.cs | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/ab7494fa/src/wp/InAppBrowser.cs
----------------------------------------------------------------------
diff --git a/src/wp/InAppBrowser.cs b/src/wp/InAppBrowser.cs
index 454464d..9d49165 100644
--- a/src/wp/InAppBrowser.cs
+++ b/src/wp/InAppBrowser.cs
@@ -41,6 +41,8 @@ namespace WPCordovaClassLib.Cordova.Commands
protected bool ShowLocation {get;set;}
protected bool StartHidden {get;set;}
+ protected string NavigationCallbackId { get; set; }
+
public void open(string options)
{
// reset defaults on ShowLocation + StartHidden features
@@ -52,6 +54,7 @@ namespace WPCordovaClassLib.Cordova.Commands
string urlLoc = args[0];
string target = args[1];
string featString = args[2];
+ this.NavigationCallbackId = args[3];
string[] features = featString.Split(',');
foreach (string str in features)
@@ -367,7 +370,7 @@ namespace WPCordovaClassLib.Cordova.Commands
string message = "{\"type\":\"exit\"}";
PluginResult result = new PluginResult(PluginResult.Status.OK, message);
result.KeepCallback = false;
- this.DispatchCommandResult(result);
+ this.DispatchCommandResult(result, NavigationCallbackId);
});
}
}
@@ -385,7 +388,7 @@ namespace WPCordovaClassLib.Cordova.Commands
string message = "{\"type\":\"loadstop\", \"url\":\"" + e.Uri.OriginalString + "\"}";
PluginResult result = new PluginResult(PluginResult.Status.OK, message);
result.KeepCallback = true;
- this.DispatchCommandResult(result);
+ this.DispatchCommandResult(result, NavigationCallbackId);
}
void browser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
@@ -393,7 +396,7 @@ namespace WPCordovaClassLib.Cordova.Commands
string message = "{\"type\":\"error\",\"url\":\"" + e.Uri.OriginalString + "\"}";
PluginResult result = new PluginResult(PluginResult.Status.ERROR, message);
result.KeepCallback = true;
- this.DispatchCommandResult(result);
+ this.DispatchCommandResult(result, NavigationCallbackId);
}
void browser_Navigating(object sender, NavigatingEventArgs e)
@@ -401,7 +404,7 @@ namespace WPCordovaClassLib.Cordova.Commands
string message = "{\"type\":\"loadstart\",\"url\":\"" + e.Uri.OriginalString + "\"}";
PluginResult result = new PluginResult(PluginResult.Status.OK, message);
result.KeepCallback = true;
- this.DispatchCommandResult(result);
+ this.DispatchCommandResult(result, NavigationCallbackId);
}
}