You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 20, 2020. It is now read-only.
// expected behavior using XHR:varmyPartial=nullvarxhr=newXMLHttpRequest()xhr.open('GET','/my/partial.html')xhr.responseType='document'xhr.onreadystatechange=function(){if(xhr.readyState==4)myPartial=xhr.responseXML}xhr.send()// after a second...myPartial.bodyinstanceofHTMLElement// => true// all is well.// -----------------------------------// behavior using qwest:qwest.get('/my/partial.html',null,{responseType: 'document'}).then(function(xhr,myPartial){xhr.responseXML// => null?!?!myPartial.body.querySelectorAll('div')// Yes, this works...myPartial.bodyinstanceofHTMLElement// => false?!?!// That's not good. When I try to use this later, exceptions get thrown.}).catch(function(xhr,error){console.error(error)})
I looked at the source code for qwest, and so far as I can tell this makes absolutely no sense. It looks like qwest should just let the responseType pass through into the XMLHttpRequest and everything should just be honky-dory. But instead, the responseXML field is null and the response data, while definitely parsed into DOM, is clearly not quite right since the prototypes don't match.
The text was updated successfully, but these errors were encountered:
Can you debug this by yourself by logging where the code is going in handleResponse()? Or can you publish a working example of your app so I can test this from home?
Test case:
I looked at the source code for qwest, and so far as I can tell this makes absolutely no sense. It looks like qwest should just let the
responseType
pass through into the XMLHttpRequest and everything should just be honky-dory. But instead, theresponseXML
field isnull
and the response data, while definitely parsed into DOM, is clearly not quite right since the prototypes don't match.The text was updated successfully, but these errors were encountered: