Skip to content
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

Ajax example on when docs will fail with git build / 3.0 #904

Open
arschmitz opened this issue Mar 28, 2016 · 2 comments
Open

Ajax example on when docs will fail with git build / 3.0 #904

arschmitz opened this issue Mar 28, 2016 · 2 comments
Assignees

Comments

@arschmitz
Copy link
Member

https://api.jquery.com/jquery.when/

The first example resolves with multiple arguments which will fail on the git build and in upcoming 3.0 release because it uses then which no longer allows multiple args and will resolve with an array now in this case.

It's also a bad example as it lack error handling

@AurelioDeRosa
Copy link
Member

I think we should keep the example because people might rely on it and maintainers of projects using our previous versions might want to understand the pattern. My proposal is to add a fail() call to the existing example and add a change in branch v3 with a single argument. We should also add an explanation of what is changed.

@dmethvin
Copy link
Member

The only reason I'd want to keep it is to explain that people should not do it. That's fine though. Any call like $.when( something-that-is-always-a-Deferred ) doesn't need $.when in the first place so we can explain that.

@AurelioDeRosa AurelioDeRosa self-assigned this Apr 19, 2016
AurelioDeRosa added a commit to AurelioDeRosa/api.jquery.com that referenced this issue Apr 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants