Every new primitive is a nail in the coffin of the next attempt to build a new competitive web browser.
(Distraught voice: "Won't they think of the Servos?!?") On Wed, Oct 30, 2019 at 3:20 PM Jan-Ivar Bruaroey <j...@mozilla.com> wrote: > This always seemed trivial to me to do with: > > Promise.all(promises.map(p => p.catch(e => e))) > > > https://stackoverflow.com/questions/31424561/wait-until-all-promises-complete-even-if-some-rejected/36115549#36115549 > > But I guess it's too late to make that point. I guess the more > primitives the merrier! > > .: Jan-Ivar :. > > On 10/30/19 5:44 PM, Jason Orendorff wrote: > > In Firefox 71, we'll ship Promise.allSettled, a standard way to `await` > > several promises at once. André Bargull [:anba] contributed the > > implementation of this feature. It's in Nightly now. > > > > Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1539694 > > Shipped in: https://bugzilla.mozilla.org/show_bug.cgi?id=1549176 > > > > Standard: https://tc39.es/ecma262/#sec-promise.allsettled > > > > MDN: > > > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled > > > > Platform coverage: All, no pref > > > > DevTools bug: N/A. The DevTools don't currently have any custom support > > for peeking at the internal state of Promise objects. > > > > Other browsers: Shipped in Chrome 76, Safari 13. > > > > Testing: There are test262 tests covering this feature: > > > https://github.com/tc39/test262/tree/master/test/built-ins/Promise/allSettled > > > > Use cases: Promise.allSettled is useful in async code. It's used to wait > > for several tasks to finish in parallel. What sets it apart from the > > existing methods Promise.race and Promise.all is that it *doesn't* > > short-circuit as soon as a single task succeeds/fails. > > > > Secure contexts: This is a JS language feature and is therefore present > > in all contexts. > > > > -j > > > > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform