jQuery vs. Promises/A

In terms of capabilities, jQuery Promises and Promises/A are nearly identical. Q.js, the most popular Promises/A library, even offers methods that can work with jQuery Promises. The differences are superficial; they use the same words to mean different things.

As previously mentioned in ​Making Promises​, jQuery uses the term resolve as the opposite of fail, whereas Promises/A uses fulfill. Under Promises/A, a Promise is said to be “resolved” when it’s either fulfilled or failed.

Up until the release of 1.8, jQuery’s then method was just a shorthand for invoking done, fail, and progress simultaneously, while Promises/A’s then acted more like jQuery’s pipe. jQuery 1.8 corrected this by making then a synonym ...

Get Async JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.