"then" renamed "complete" and new "then" method defined using "complete" and "fail" internally. The API is still symetrical (complete/fail), still promotes AOP but is also now Promise/A compliant. Changed unit tests and ajax module accordingly.

This commit is contained in:
jaubourg 2011-01-05 04:29:30 +01:00
parent 4ab94a578e
commit cbf591152c
3 changed files with 40 additions and 36 deletions

View file

@ -496,9 +496,9 @@ jQuery.extend({
// Attach deferreds
deferred.promise( jXHR );
jXHR.success = jXHR.then;
jXHR.success = jXHR.complete;
jXHR.error = jXHR.fail;
jXHR.complete = completeDeferred.then;
jXHR.complete = completeDeferred.complete;
// Remove hash character (#7531: and string promotion)
s.url = ( "" + s.url ).replace( rhash , "" );