api.jquery.com
api.jquery.com copied to clipboard
Please improve documentation: ajaxComplete is called before or after success/error callbacks?
Description
https://api.jquery.com/ajaxcomplete/
I am new to jQuery and there is not so clear: .ajaxComplete is called bofore or after success/error callbacks?
Thank you.
Thanks for the report. I don't think we guarantee anything about the order here; however, in practice, the event is fired after the callbacks are called. If you use promise then/catch methods, though, note that they are async so they'll fire later.
We're fine with documenting this, but we'd like to take time to make sure it's been consistent historically. If the order has ever changed, it should be noted which versions are different from others.