Does Jquery.deferred Have A Bug When A Jquery.deferred Object Is Passed To Deferred.resolve?
Solution 1:
It's not a bug, but it might be a missing feature. jQuery never attempted to implement the standard Promise
constructor, and its Deferred
constructor does something quite different. Admittedly, if resolve
actually fulfills, they definitely mess with the standard terminology; again however jQuery's implementation does predate the standard so it's not surprising.
Is the output a jQuery bug relevant to jQuery's implementation of the Promise/A+ specification?
No, the Promise/A+ specification is only concerned with the behaviour of the then
function, not the promise construction. There were indeed many inherent problems with that in jQuery's promise implementation, but since version 3 those have been fixed at least (which can be tested), so jQuery promise instances are now interoperable with all other implementations.
Post a Comment for "Does Jquery.deferred Have A Bug When A Jquery.deferred Object Is Passed To Deferred.resolve?"