Received jqXHR object from my $.post query contains done function. But I realized that this function returns just its jqXHR object:
$.post
done
$.post(query, function(a,b,jqXHR) { jqXHR === jqXHR.done() //true });
How shoud I interpret that?
Since jquery's ajax call return a Promise, any of done(), fail(), always(), and then() functions will return the jqXHR object in order for the Promise to work correctly.
jquery
done()
fail()
always()
then()
jqXHR
More information can be found here: http://api.jquery.com/jQuery.ajax/#callback-functions
Since
jquery
's ajax call return a Promise, any ofdone()
,fail()
,always()
, andthen()
functions will return thejqXHR
object in order for the Promise to work correctly.More information can be found here:
http://api.jquery.com/jQuery.ajax/#callback-functions