diff --git a/categories.xml b/categories.xml index 266a0524..41e109fa 100644 --- a/categories.xml +++ b/categories.xml @@ -619,6 +619,13 @@ var files = event.originalEvent.dataTransfer.files;
]]> + + This version has not been released yet. Behavior may change before the final release. +

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

+
+ ]]>
+
Aspects of the API that were changed in the corresponding version of jQuery.

@@ -629,6 +636,13 @@ var files = event.originalEvent.dataTransfer.files;
]]>
+ + This version has not been released yet. Behavior may change before the final release. +

All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.

+
+ ]]>
+
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml index 3afaf650..04a3552d 100644 --- a/entries/jQuery.ajax.xml +++ b/entries/jQuery.ajax.xml @@ -291,6 +291,9 @@ jqxhr.always(function() {
  • responseXML and/or responseText when the underlying request responded with xml and/or text, respectively
  • +
  • + responseURL (as of jQuery 4.1) is the final URL of the response after any redirects, when the underlying transport reports it. For XMLHttpRequest-based requests in modern browsers, this mirrors XMLHttpRequest.responseURL; for script, JSONP, aborted, or otherwise unsupported requests it is undefined. +
  • status
  • @@ -464,4 +467,5 @@ $.ajax({ + diff --git a/entries/jQuery.ajaxTransport.xml b/entries/jQuery.ajaxTransport.xml index ccc73ce8..d0c8248c 100644 --- a/entries/jQuery.ajaxTransport.xml +++ b/entries/jQuery.ajaxTransport.xml @@ -40,17 +40,23 @@ $.ajaxTransport( dataType, function( options, originalOptions, jqXHR ) {
  • headers is an object of (key-value) request headers that the transport can transmit if it supports it
  • completeCallback is the callback used to notify Ajax of the completion of the request
  • -

    completeCallback has the following signature:

    +

    In jQuery 3.8, 4.1 or newer completeCallback accepts a single params object:

    
    -function( status, statusText, responses, headers ) {}
    +function( params ) {}
         
    -

    where:

    +

    with the following properties:

    • status is the HTTP status code of the response, like 200 for a typical success, or 404 for when the resource is not found.
    • statusText is the statusText of the response.
    • responses (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 { xml: XMLData, text: textData } for a response that is an XML document)
    • headers (Optional) is a string containing all the response headers if the transport has access to them (akin to what XMLHttpRequest.getAllResponseHeaders() would provide).
    • +
    • responseURL (Optional, as of jQuery 4.1) is the final URL of the response after any redirects, if the transport has access to it (akin to what XMLHttpRequest.responseURL would provide). It is exposed on the jqXHR object as jqXHR.responseURL.
    +

    An older, positional-arguments form is also supported, but limited to the following four parameters:

    +
    
    +function( status, statusText, responses, headers ) {}
    +    
    +

    The parameters have the same meaning as the object properties described above. Both calling conventions are supported; jQuery detects which one is used by checking whether the first argument is an object.

    Just like prefilters, a transport's factory function can be attached to a specific dataType:

    
     $.ajaxTransport( "script", function( options, originalOptions, jqXHR ) {
    @@ -70,7 +76,11 @@ $.ajaxTransport( "image", function( s ) {
                 var statusText = ( status === 200 ) ? "success" : "error",
                   tmp = image;
                 image = image.onreadystatechange = image.onerror = image.onload = null;
    -            callback( status, statusText, { image: tmp } );
    +            callback( {
    +              status: status,
    +              statusText: statusText,
    +              responses: { image: tmp }
    +            } );
               }
             }
             image.onreadystatechange = image.onload = function() {
    @@ -128,4 +138,6 @@ jQuery.ajaxSetup({
       
       
       
    +  
    +