Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fixed for recent jQuery, where the xhr object is a jQuery wrapper and no... #1

Closed
wants to merge 1 commit into from

2 participants

Luke Plant execjosh
Luke Plant

...t the native XHR object.

I don't know if you are interested in fixing this, but I found I had to make these changes to get it to work with jquery 1.7. Otherwise I get "TypeError: Object # has no method 'open'" because the xhr object that jquery.ajax returns does not have the 'open' method (it's jquery's own wrapper object).

execjosh
Owner

Thank you for your contribution! I think this is basically just a revert of f3e8591, right? Anyway, I cherry-picked this commit into branch v0.1 (8dddda7).

execjosh execjosh closed this April 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Apr 12, 2012
Luke Plant Fixed for recent jQuery, where the xhr object is a jQuery wrapper and…
… not the native XHR object.
a0a3175
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 7 deletions. Show diff stats Hide diff stats

  1. 8  src/jquery.ajaxretry.js
8  src/jquery.ajaxretry.js
@@ -87,13 +87,7 @@
87 87
 				}
88 88
 			};
89 89
 
90  
-			// Save the XHR object for reuse!
91  
-			var xhr = original_ajax_func(settings);
92  
-			settings.xhr = function(){
93  
-				return xhr;
94  
-			};
95  
-
96  
-			return xhr;
  90
+			return original_ajax_func(settings);
97 91
 		},
98 92
 		ajaxRetrySetup = function(opts){
99 93
 			DEF_OPTS = $.extend(true, DEF_OPTS, opts);
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.