Promises

Domenic Denicola domenic at domenicdenicola.com
Thu Nov 8 03:58:06 PST 2012


On Nov 8, 2012, at 6:45, "Mariusz Nowak" <medikoo+mozilla.org at medikoo.com> wrote:

> Q implementors spotted that issue, and provided `done` (initially named as
> `end`) function. Which helps to work with that issue:
> 
> promise.then(function () {
> // process the value
> }).done(); // Sugar for above
> 
> Still in Q (as far I as know) we're not able to get to resolved value
> without extending the promise chain and that's not great.

If I understand correctly, promise.done(onFulfilled, onRejected) does what you want in Q and in WinJS. See

http://msdn.microsoft.com/en-us/library/windows/apps/hh700337.aspx

for a nice explanation from the WinJS folks.


More information about the es-discuss mailing list