Last active
December 17, 2015 22:58
-
-
Save couto/5685530 to your computer and use it in GitHub Desktop.
Warn about any AJAX request made synchronously, while navigating within the application
This file contains hidden or 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
(function () { | |
var open = XMLHttpRequest.prototype.open; | |
XMLHttpRequest.prototype.open = function () { | |
var args = [].slice.call(arguments, 0); | |
if (!args[2]) { | |
console.error("Synchronous Request found!"); | |
console.trace(); | |
} | |
return open.apply(this, args); | |
}; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment