好吧,主题。无法弄明白......
条件:两个承诺一个接一个地异步启动,不。像这样:
spashGoing.then(doSomethingForItself());
writingGoing.then(doSomethingForItself2());
DoSomethingAfterBothPromises()
P上。 S.我使用WinJS的承诺,而不是ES2015 / ES2016,但他们没有很大的差异。
答案 0 :(得分:4)
如果WinJS承诺是Promise / A +承诺
Promise.all([
spashGoing.then(doSomethingForItself),
writingGoing.then(doSomethingForItself2)
]).then(function(results) {
// do things with results
});
好吧,回答太早了 - WinJS的承诺是微软“让事情略有不同”的典型例子对网络的态度
答案 1 :(得分:1)