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