Skip to content

Instantly share code, notes, and snippets.

@ThisIsMissEm
Created February 3, 2010 12:35
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 ThisIsMissEm/293569 to your computer and use it in GitHub Desktop.
Save ThisIsMissEm/293569 to your computer and use it in GitHub Desktop.
var asyncComputeTheAnswerToEverything = function(){
var promise = new dojox.Promise();
window.setTimeout(function(){ // some async operation
var data = 42;
promise.emit([data]);
},2000);
return promise;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment