Skip to content

Using Promise-compatible instead of Deferred-compatible #567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AurelioDeRosa opened this issue Oct 5, 2014 · 1 comment
Closed

Using Promise-compatible instead of Deferred-compatible #567

AurelioDeRosa opened this issue Oct 5, 2014 · 1 comment

Comments

@AurelioDeRosa
Copy link
Member

In the page about $.Deferred the text asserts:

In most cases where a jQuery API call returns a Deferred or Deferred-compatible object, such as jQuery.ajax() or jQuery.when()

I think it'd be better to call these objects Promise-compatible because objects like jqXHR implement the Promise interface (source), so they can't call methods like resolve() or reject(). I know this is a very minor change but it seems reasonable to me.

@kswedberg
Copy link
Member

Makes sense to me, too.

AurelioDeRosa added a commit to AurelioDeRosa/api.jquery.com that referenced this issue Oct 10, 2014
Based on the definition we gave with jquery#567, the returned value of $.ajax() it's actually a Promise-compatible object and not a Promise object.
gnarf pushed a commit that referenced this issue Dec 23, 2014
Based on gh-567 the returned value of $.ajax() is actually a Promise-compatible object and not a Promise object.

Closes gh-574
Ref gh-567
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants