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 2014/01/31 20:43:53 UTC

[3/3] git commit: apply CB-5219 to WP7 also

apply CB-5219 to WP7 also


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

Branch: refs/heads/master
Commit: bb7abee6b1d487c3b43b37ced798a36644f40eb7
Parents: cf71c27
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Jan 31 11:43:25 2014 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Fri Jan 31 11:43:25 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/bb7abee6/wp7/template/cordovalib/XHRHelper.cs
----------------------------------------------------------------------
diff --git a/wp7/template/cordovalib/XHRHelper.cs b/wp7/template/cordovalib/XHRHelper.cs
index ae4daf8..058d317 100644
--- a/wp7/template/cordovalib/XHRHelper.cs
+++ b/wp7/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();