Created
September 12, 2011 10:38
-
-
Save canonic-epicure/1210985 to your computer and use it in GitHub Desktop.
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
t.simulateDrag(el, 10, 10).then(function (cont) { | |
store.doXHRRequest({ | |
callback : function () { | |
cont.CONTINUE('result') | |
// or just | |
cont('result') | |
}, | |
errback : function (err) { | |
cont.THROW(err) | |
} | |
}) | |
}).then(function (cont, result) { | |
result == 'result' // received from previous segment | |
// in general, do you stuff asynchronously, | |
// then call the cont.CONTINUE(result) or cont(result) when done | |
// or cont.THROW(error) in case of any error | |
cont.CONTINUE() | |
}).then(...) | |
// optional - CATCH/FINALLY sections: | |
.except(function (cont) { | |
}).ensure(function (cont) { | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment