IE9 jqXHR.responseXML returns "undefined"
IE9 jqXHR.responseXML returns "undefined" while FireFox 3.6.13 correctly returns: [object XMLDocument]
by jaubourg
HTML
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-16"/>
<head>
<title>Hello</title>
</head>
<body>
</body>
</html>
JavaScript
$.ajaxPrefilter(function( options, _, jqXHR ) {
var oldXHR = options.xhr,
xhr;
options.xhr = function() {
return xhr = oldXHR.apply( options, arguments );
};
jqXHR.complete(function() {
alert("xhr.responseText = " + xhr.responseText);
alert("xhr.responseXML = " + xhr.responseXML);
});
});
$.ajax({
url: "/echo/xml",
dataType: "xml",
complete: function(jqXHR) {
alert("jqXHR.responseText = " + jqXHR.responseText);
alert("jqXHR.responseXML = " + jqXHR.responseXML);
}
});