Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CB-6450 added support for local XHR.responseXML getter
  • Loading branch information
purplecabbage committed Apr 25, 2014
1 parent 30fba42 commit 67715e0294c362a0ee9585ec8165d47a95fc4964
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
@@ -226,6 +226,11 @@ public void InjectScript()
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);
@@ -226,6 +226,11 @@ public void InjectScript()
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);

0 comments on commit 67715e0

Please sign in to comment.