Skip to content

Instantly share code, notes, and snippets.

@suvene
Created December 20, 2008 15:43
Show Gist options
  • Save suvene/38346 to your computer and use it in GitHub Desktop.
Save suvene/38346 to your computer and use it in GitHub Desktop.
var r = function(g){ var it = g(function(v){ it.send(v); }); it.next(); };
r(function(resume) {
var res = yield util.httpGet(url, function(xhr) {
resume(xhr.responseText);
});
alert(res);
yield;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment