Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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