Created
June 26, 2013 12:54
-
-
Save mokkabonna/5867147 to your computer and use it in GitHub Desktop.
reported by frameworks when browser cancells ajax request
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
//vermin readystate 4, status 0 | |
vermin.ajax.get('/longrunning', { | |
failure: function() { | |
console.log(JSON.stringify(arguments)); | |
} | |
}); | |
//jquery readystate 0, status 0 | |
$.get('/longrunning').fail(function() { | |
console.log(JSON.stringify(arguments)); | |
}); | |
//native readystate 4, status 0 | |
var xmlhttp; | |
xmlhttp = new XMLHttpRequest(); | |
xmlhttp.onreadystatechange = function() { | |
console.log(xmlhttp.readyState, xmlhttp.status); | |
}; | |
xmlhttp.open("GET", "/longrunning", false); | |
xmlhttp.send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment