cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject git commit: CB-6450 added support for local XHR.responseXML getter
Date Fri, 25 Apr 2014 20:58:50 GMT
Repository: cordova-wp8
Updated Branches:
  refs/heads/master 30fba4235 -> 67715e029


CB-6450 added support for local XHR.responseXML getter


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

Branch: refs/heads/master
Commit: 67715e0294c362a0ee9585ec8165d47a95fc4964
Parents: 30fba42
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Fri Apr 25 13:58:35 2014 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Fri Apr 25 13:58:35 2014 -0700

----------------------------------------------------------------------
 wp7/template/cordovalib/XHRHelper.cs | 5 +++++
 wp8/template/cordovalib/XHRHelper.cs | 5 +++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/67715e02/wp7/template/cordovalib/XHRHelper.cs
----------------------------------------------------------------------
diff --git a/wp7/template/cordovalib/XHRHelper.cs b/wp7/template/cordovalib/XHRHelper.cs
index 0e3a5e9..e2d4593 100644
--- a/wp7/template/cordovalib/XHRHelper.cs
+++ b/wp7/template/cordovalib/XHRHelper.cs
@@ -226,6 +226,11 @@ namespace WPCordovaClassLib.CordovaLib
                             alias.status = responseCode;
                             if (responseCode == '200') {
                                 alias.responseText = responseText;
+                                Object.defineProperty(alias, 'responseXML', {
+                                    get: function () {
+                                        return new DOMParser().parseFromString(this.responseText,
'text/xml');
+                                    }
+                                });
                             }
                             else {
                                 alias.onerror && alias.onerror(responseCode);

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/67715e02/wp8/template/cordovalib/XHRHelper.cs
----------------------------------------------------------------------
diff --git a/wp8/template/cordovalib/XHRHelper.cs b/wp8/template/cordovalib/XHRHelper.cs
index 0e3a5e9..e2d4593 100644
--- a/wp8/template/cordovalib/XHRHelper.cs
+++ b/wp8/template/cordovalib/XHRHelper.cs
@@ -226,6 +226,11 @@ namespace WPCordovaClassLib.CordovaLib
                             alias.status = responseCode;
                             if (responseCode == '200') {
                                 alias.responseText = responseText;
+                                Object.defineProperty(alias, 'responseXML', {
+                                    get: function () {
+                                        return new DOMParser().parseFromString(this.responseText,
'text/xml');
+                                    }
+                                });
                             }
                             else {
                                 alias.onerror && alias.onerror(responseCode);


Mime
View raw message