Created
May 21, 2015 18:46
-
-
Save evansolomon/1fcf01178193ea22426d to your computer and use it in GitHub Desktop.
Chrome 43 changed the way XMLHttpRequest objects get serialized to JSON. Almost all of the fields as missing now.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xhr = new XMLHttpRequest() | |
xhr.open('GET', 'http://requestb.in/155pmaz1') | |
xhr.onreadystatechange = function () { | |
if (xhr.readyState !== 4) return | |
var jsonifiedXhr = JSON.parse(JSON.stringify(xhr)) | |
console.log(Object.keys(jsonifiedXhr)) | |
} | |
xhr.send() | |
// Chrome 42 | |
// ["statusText", "status", "responseURL", "response", "responseType", ...] | |
// Chrome 43 | |
// ["response", "responseText"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment