Created
July 11, 2014 16:37
-
-
Save JosePedroDias/58b715cb775c6e9ca211 to your computer and use it in GitHub Desktop.
synchronous AJAX. don't do it :P
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 ajax = function(uri) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', uri, false); | |
xhr.send(null); | |
return xhr.responseText; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment