Appendix B. The Promises/A+ Specification
A promise represents the eventual result of an asynchronous operation. The
primary way of interacting with a promise is through its
then method, which
registers callbacks to receive either a promise’s eventual value or the reason
why the promise cannot be fulfilled.
This specification details the behavior of the
then method, providing an
interoperable base which all Promises/A+ conformant promise implementations
can be depended on to provide. As such, the specification should be considered
very stable. Although the Promises/A+ organization may occasionally revise
this specification with minor backward-compatible changes to address
newly-discovered corner cases, we will integrate large or
backward-incompatible only after careful consideration, discussion, and
Historically, Promises/A+ clarifies the behavioral clauses of the earlier Promises/A proposal, extending it to cover de facto behaviors and omitting parts that are underspecified or problematic.
Finally, the core Promises/A+ specification does not deal with how to create,
fulfill, or reject promises, choosing instead to focus on providing an
then method. Future work in companion specifications may
touch on these subjects.
“promise” is an object or function with a
thenmethod whose behavior conforms to this specification.
- “thenable” is an object or function ...