Skip to content

Instantly share code, notes, and snippets.

@calvinmetcalf
Created June 30, 2013 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calvinmetcalf/5896592 to your computer and use it in GitHub Desktop.
Save calvinmetcalf/5896592 to your computer and use it in GitHub Desktop.
good worker
var paralellAjax = cw(function(url,callback){
var ajax = new XMLHttpRequest();
ajax.onreadystatechange = function(resp){
if(ajax.readyState === 4 && ajax.status === 200) {
calback(JSON.stringify(ajax.response));
}
}
ajax.open('GET',url,true);
ajax.send();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment