api.jquery.com icon indicating copy to clipboard operation
api.jquery.com copied to clipboard

Please improve documentation: ajaxComplete is called before or after success/error callbacks?

Open KES777 opened this issue 3 years ago • 2 comments

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.

KES777 avatar Dec 31 '22 14:12 KES777

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.

mgol avatar Jan 11 '23 15:01 mgol

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.

timmywil avatar Feb 06 '23 17:02 timmywil