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

Fix #1108 - document return value of sync. #1111

Merged
merged 2 commits into from
Mar 21, 2012
Merged

Fix #1108 - document return value of sync. #1111

merged 2 commits into from
Mar 21, 2012

Conversation

braddunbar
Copy link
Collaborator

No description provided.

@jashkenas
Copy link
Owner

Thanks, but I don't think that just saying "returns its result" is particularly helpful here -- what is Backbone.sync's result?

Perhaps we should instead mention that it returned the jQuery deferred xhr object (with links to the jQuery docs) in a couple of places instead.

@braddunbar
Copy link
Collaborator Author

I also added documentation to effect that Backbone.sync returns the result of $.ajax by default. We could be more specific here and say that it returns a jqXHR but that's not true in cases where jQuery is not used as the DOM abstraction library. Is it ok to ignore other DOM libs in this case?

@jashkenas
Copy link
Owner

Yep -- we can document for the common case. I'd bet 95%+ of Backbone projects use jQuery.

@braddunbar
Copy link
Collaborator Author

Sounds good. I'll work up the change later today.

@braddunbar
Copy link
Collaborator Author

Documented jqXHR in 0ae1627.

jashkenas added a commit that referenced this pull request Mar 21, 2012
Fix #1108 - document return value of `sync`.
@jashkenas jashkenas merged commit a554d6b into jashkenas:master Mar 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants