![]() All handlers attached to the same promise object are always called in the order they were added. If you call the then() method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. It is the primitive method of promises: the thenable protocol expects all promise-like objects to expose a then() method, and the catch() and finally() methods both work by invoking the object's then() method.įor more information about the onRejected handler, see the catch() reference. The then() method schedules callback functions for the eventual completion of a Promise - either fulfillment or rejection.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |