Commit 18efb243 authored by Julien Cigar's avatar Julien Cigar
Browse files

add AjaxResponse.get_response wrapper around reponseXML / responseText

parent 7868071c
......@@ -311,6 +311,14 @@
return this.readyStates[this.o.readyState] || 'unknown';
}
Yeti.AjaxResponse.prototype.get_response = function() {
if (this.o.responseXML) {
return this.o.responseXML;
} else {
return this.o.responseText
}
}
Yeti.AjaxResponse.prototype.success = function() {
return this.get_state() == 'complete' && this.get_status() == 'ok';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment