From 722e09b5eeb08f460ffccbccbe8059504d0e1c9d Mon Sep 17 00:00:00 2001 From: Han Seoul-Oh Date: Thu, 23 Jun 2016 16:14:12 -0700 Subject: [PATCH 1/4] Update jQuery.post.xml not to imply jqXHR.always() was in 1.5 While I'm there, fix missing --- entries/jQuery.post.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entries/jQuery.post.xml b/entries/jQuery.post.xml index 91382759..6152350a 100644 --- a/entries/jQuery.post.xml +++ b/entries/jQuery.post.xml @@ -50,7 +50,7 @@ $.post( "ajax/test.html", function( data ) {

This example fetches the requested HTML snippet and inserts it on the page.

Pages fetched with POST are never cached, so the cache and ifModified options in jQuery.ajaxSetup() have no effect on these requests.

The jqXHR Object

-

As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the XMLHTTPRequest object. This jQuery XHR object, or "jqXHR," returned by $.get() implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done() (for success), jqXHR.fail() (for error), and jqXHR.always() (for completion, whether success or error) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax() documentation.

+

As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the XMLHTTPRequest object. This jQuery XHR object, or "jqXHR," returned by $.get() implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done() (for success), jqXHR.fail() (for error), and jqXHR.always() (for completion, whether success or error; added in jQuery 1.6) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax() documentation.

The Promise interface also allows jQuery's Ajax methods, including $.get(), to chain multiple .done(), .fail(), and .always() callbacks on a single request, and even to assign these callbacks after the request may have completed. If the request is already complete, the callback is fired immediately.


 // Assign handlers immediately after making the request,
@@ -66,7 +66,7 @@ var jqxhr = $.post( "example.php", function() {
   })
   .always(function() {
     alert( "finished" );
-});
+  });
 
 // Perform other work here ...
 

From 0acc93702bdc7009af5a1973e555b52de5cf7834 Mon Sep 17 00:00:00 2001
From: Han Seoul-Oh 
Date: Thu, 23 Jun 2016 16:18:01 -0700
Subject: [PATCH 2/4] Update jQuery.get.xml not to imply jqXHR.always() was in
 1.5

---
 entries/jQuery.get.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/entries/jQuery.get.xml b/entries/jQuery.get.xml
index 87707e51..be1e25a2 100644
--- a/entries/jQuery.get.xml
+++ b/entries/jQuery.get.xml
@@ -49,7 +49,7 @@ $.get( "ajax/test.html", function( data ) {
     

This example fetches the requested HTML snippet and inserts it on the page.

The jqXHR Object

-

As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the XMLHTTPRequest object. This jQuery XHR object, or "jqXHR," returned by $.get() implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done() (for success), jqXHR.fail() (for error), and jqXHR.always() (for completion, whether success or error) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax() documentation.

+

As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the XMLHTTPRequest object. This jQuery XHR object, or "jqXHR," returned by $.get() implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done() (for success), jqXHR.fail() (for error), and jqXHR.always() (for completion, whether success or error; added in jQuery 1.6) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax() documentation.

The Promise interface also allows jQuery's Ajax methods, including $.get(), to chain multiple .done(), .fail(), and .always() callbacks on a single request, and even to assign these callbacks after the request may have completed. If the request is already complete, the callback is fired immediately.


 // Assign handlers immediately after making the request,

From cafd1c828c7eca5c3230519f96bc61cc3695e26d Mon Sep 17 00:00:00 2001
From: Han Seoul-Oh 
Date: Thu, 23 Jun 2016 16:20:34 -0700
Subject: [PATCH 3/4] Update jQuery.ajax.xml not to imply jqXHR.always() was in
 1.5

---
 entries/jQuery.ajax.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index d5e6a33c..c35582bc 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -240,7 +240,7 @@ $.ajax({
         

  • - jqXHR.always(function( data|jqXHR, textStatus, jqXHR|errorThrown ) { }); + jqXHR.always(function( data|jqXHR, textStatus, jqXHR|errorThrown ) { }); (added in jQuery 1.6)

    An alternative construct to the complete callback option, the .always() method replaces the deprecated .complete() method.

    In response to a successful request, the function's arguments are the same as those of .done(): data, textStatus, and the jqXHR object. For failed requests the arguments are the same as those of .fail(): the jqXHR object, textStatus, and errorThrown. Refer to deferred.always() for implementation details.

  • From 8dfe16e25f37116f641e474345e72c71e2fa94fc Mon Sep 17 00:00:00 2001 From: Han Seoul-Oh Date: Thu, 23 Jun 2016 16:24:12 -0700 Subject: [PATCH 4/4] Update jQuery.getJSON.xml not to imply jqXHR.always() was in 1.5 --- entries/jQuery.getJSON.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/jQuery.getJSON.xml b/entries/jQuery.getJSON.xml index 7d5e08b6..c3b1e1e2 100644 --- a/entries/jQuery.getJSON.xml +++ b/entries/jQuery.getJSON.xml @@ -61,7 +61,7 @@ $.getJSON( "ajax/test.json", function( data ) {

    JSONP

    If the URL includes the string "callback=?" (or similar, as defined by the server-side API), the request is treated as JSONP instead. See the discussion of the jsonp data type in $.ajax() for more details.

    The jqXHR Object

    -

    As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the XMLHTTPRequest object. This jQuery XHR object, or "jqXHR," returned by $.getJSON() implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done() (for success), jqXHR.fail() (for error), and jqXHR.always() (for completion, whether success or error) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax() documentation.

    +

    As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the XMLHTTPRequest object. This jQuery XHR object, or "jqXHR," returned by $.getJSON() implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done() (for success), jqXHR.fail() (for error), and jqXHR.always() (for completion, whether success or error; added in jQuery 1.6) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax() documentation.

    The Promise interface in jQuery 1.5 also allows jQuery's Ajax methods, including $.getJSON(), to chain multiple .done(), .always(), and .fail() callbacks on a single request, and even to assign these callbacks after the request may have completed. If the request is already complete, the callback is fired immediately.

    
     // Assign handlers immediately after making the request,