naxfail.blogg.se

Crosscode a promise is a promise 3
Crosscode a promise is a promise 3










crosscode a promise is a promise 3

"reason" is a value that indicates why a promise was rejected.Ī promise must be in one of three states: pending, fulfilled, or rejected."exception" is a value that is thrown using the throw statement."value" is any legal JavaScript value (including undefined, a thenable, or a promise)."thenable" is an object or function that defines a then method."promise" is an object or function with a then method whose behavior conforms to this specification.Future work in companion specifications may touch on these subjects.

crosscode a promise is a promise 3

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.įinally, the core Promises/A+ specification does not deal with how to create, fulfill, or reject promises, choosing instead to focus on providing an interoperable then method. 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 changes only after careful consideration, discussion, and testing.

crosscode a promise is a promise 3

As such, the specification should be considered very stable. 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. 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. An open standard for sound, interoperable JavaScript promises-by implementers, for implementers.Ī promise represents the eventual result of an asynchronous operation.












Crosscode a promise is a promise 3