[whatwg] How works Promise.any() if it was called with resolved promises?

Tab Atkins Jr. jackalmage at gmail.com
Fri Jun 14 07:32:05 PDT 2013

On Fri, Jun 14, 2013 at 2:25 PM, Tetsuharu OHZEKI
<saneyuki.snyk at gmail.com> wrote:
> I have questions about DOM Promise.
> If we call `Promises.any()` with resolved promises, how does it
> execute its fulfillCallback?

The returned promise is immediately fulfilled, so the callback will be
called in the next tick.

Remember, the whole point of promises is that you can add new
callbacks before *or* after the promise is resolved, and it'll work
either way.


More information about the whatwg mailing list