WHAT’S IN THIS CHAPTER?
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
The wrox.com code downloads for this chapter are found at
The last chapter illustrated how to code and test (or, more correctly, test and code) the Callback Pattern. In the main example,
Promise object. If you must support older browsers, polyfills are available.
Promise is an object that encapsulates an asynchronous operation and what to do upon its eventual outcome. When the operation completes, a callback encapsulated in the
Promise will be invoked. Actually, there can be two callbacks: one for success and one for failure. (The first callback does not ...