Skip to content

Instantly share code, notes, and snippets.

@bkardell
Last active February 11, 2016 22:55
Show Gist options
  • Save bkardell/3eebe21db148716d081f to your computer and use it in GitHub Desktop.
Save bkardell/3eebe21db148716d081f to your computer and use it in GitHub Desktop.
1) Open https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest (I dont know why this particular url matters, but others are doing something else for me so use this one -- 2) Run this in the console on an HTTPs page in various versions of chrome, 47/48 appear to swallow the error with nothing logged - 41 appears to l…
var oReq;
try{
oReq = new XMLHttpRequest();
oReq.addEventListener("load", function () { console.log("success event"); });
oReq.addEventListener("error", function () { console.error("error event"); });
oReq.open("GET", "http://www.example.org/example.txt");
oReq.send();
} catch (e) {
console.error("error thrown");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment