cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/3] git commit: [CB-5219] weinre disconnects when history.replaceState is used
Date Fri, 31 Jan 2014 19:43:51 GMT
Updated Branches:
  refs/heads/master 331fef442 -> bb7abee6b


[CB-5219] weinre disconnects when history.replaceState is used


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

Branch: refs/heads/master
Commit: a82f3d0c4d4ce77ee194c5892377d4c01a19f6b1
Parents: 2386d7a
Author: sgrebnov <sergei.grebnov@gmail.com>
Authored: Mon Jan 20 20:27:32 2014 +0400
Committer: sgrebnov <sergei.grebnov@gmail.com>
Committed: Mon Jan 20 20:27:32 2014 +0400

----------------------------------------------------------------------
 wp8/template/cordovalib/XHRHelper.cs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/a82f3d0c/wp8/template/cordovalib/XHRHelper.cs
----------------------------------------------------------------------
diff --git a/wp8/template/cordovalib/XHRHelper.cs b/wp8/template/cordovalib/XHRHelper.cs
index ae4daf8..058d317 100644
--- a/wp8/template/cordovalib/XHRHelper.cs
+++ b/wp8/template/cordovalib/XHRHelper.cs
@@ -118,7 +118,9 @@ namespace WPCordovaClassLib.CordovaLib
             changeReadyState: function(newState) {
                 this.readyState = newState;
                 if (this.onreadystatechange) {
-                    this.onreadystatechange();
+                    // mimic simple 'readystatechange' event which should be passed as per
spec
+                    var evt = {type: 'readystatechange', target: this, timeStamp: new Date().getTime()};
+                    this.onreadystatechange(evt);
                 }
                 if (this.readyState == XHRShim.DONE){
                     this.onload && this.onload();


Mime
View raw message