jQuery.ajaxTransport: Add object signature to completeCallback#1300
Open
mgol wants to merge 1 commit into
Open
jQuery.ajaxTransport: Add object signature to completeCallback#1300mgol wants to merge 1 commit into
mgol wants to merge 1 commit into
Conversation
4 tasks
7765834 to
b35c355
Compare
…teCallback This will be supported in jQuery `>=3.8 <4 || >=4.1`.
b35c355 to
ff75c91
Compare
Member
Author
timmywil
reviewed
Jun 1, 2026
timmywil
reviewed
Jun 1, 2026
mgol
commented
Jun 1, 2026
| <li><code>completeCallback</code> is the callback used to notify Ajax of the completion of the request</li> | ||
| </ul> | ||
| <p><code>completeCallback</code> has the following signature:</p> | ||
| <p>In jQuery 3.8, 4.1 or newer <code>completeCallback</code> accepts a single params object:</p> |
Member
Author
There was a problem hiding this comment.
@timmywil Would the following be clearer? I have a feeling it would.
Suggested change
| <p>In jQuery 3.8, 4.1 or newer <code>completeCallback</code> accepts a single params object:</p> | |
| <p>In jQuery 3.8 or newer (with the single exception of jQuery 4.0.0), completeCallback accepts a single params object:</p> |
Member
There was a problem hiding this comment.
That's better, but I still like mentioning 4.1. What about this?
Suggested change
| <p>In jQuery 3.8, 4.1 or newer <code>completeCallback</code> accepts a single params object:</p> | |
| <p>As of jQuery 3.8 and 4.1 (excluding jQuery 4.0), <code>completeCallback</code> accepts a single params object:</p> |
timmywil
reviewed
Jun 2, 2026
| <li><code>statusText</code> is the statusText of the response.</li> | ||
| <li><code>responses</code> (Optional) is An object containing dataType/value that contains the response in all the formats the transport could provide (for instance, a native XMLHttpRequest object would set responses to <code>{ xml: XMLData, text: textData }</code> for a response that is an XML document)</li> | ||
| <li><code>headers</code> (Optional) is a string containing all the response headers if the transport has access to them (akin to what <code>XMLHttpRequest.getAllResponseHeaders()</code> would provide).</li> | ||
| <li><code>responseURL</code> (Optional, <strong>as of jQuery 4.1</strong>) is the final URL of the response after any redirects, if the transport has access to it (akin to what <code>XMLHttpRequest.responseURL</code> would provide). It is exposed on the jqXHR object as <code>jqXHR.responseURL</code>.</li> |
Member
There was a problem hiding this comment.
Suggested change
| <li><code>responseURL</code> (Optional, <strong>as of jQuery 4.1</strong>) is the final URL of the response after any redirects, if the transport has access to it (akin to what <code>XMLHttpRequest.responseURL</code> would provide). It is exposed on the jqXHR object as <code>jqXHR.responseURL</code>.</li> | |
| <li><code>responseURL</code> (Optional) is the final URL of the response after any redirects, if the transport has access to it (akin to what <code>XMLHttpRequest.responseURL</code> would provide). It is exposed on the jqXHR object as <code>jqXHR.responseURL</code>. <strong>Added in jQuery 4.1.</strong></li> |
Previous language sounds like it was required before jQuery 4.1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This will be supported in jQuery
>=3.8 <4 || >=4.1.Docs
Before
After
Example
Before
After
New category (4.1)