In the Mozilla Promise
documentation, there is a Guarantees section:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#Guarantees
It contains the following statement:
Unlike "old-style", passed-in callbacks, a promise comes with some guarantees:
Callbacks will never be called before the completion of the current run of the JavaScript event loop.
This makes sense to me and is the behavior I would expect, but I'm looking for some additional documentation supporting this "Guarantee".
Is there some sort of spec that explicitly documents / requires this? Is this guaranteed for any javascript runtime that provides a native Promise implementation? Is it the wild west, and you can't depend on it, etc.