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

Make callbacks.fireWith work with non-array arguments #3844

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@dratini0

dratini0 commented Nov 14, 2017

Summary

In jquery/api.jquery.com#1066, I have noticed that a way to call callbacks.fireWith is documented, but doing so doesn't work. This PR fixes that.

Checklist

@dratini0

This comment has been minimized.

Show comment
Hide comment
@dratini0

dratini0 commented Nov 14, 2017

A demonstration of the bug: https://jsfiddle.net/48Lmdmmf/

@gibson042

This comment has been minimized.

Show comment
Hide comment
@gibson042

gibson042 Nov 20, 2017

Member

callbacks#fireWith was introduced in 1.7.0, and as far as we can tell has always required args to be an array-like object (which makes sense, since the method is analogous to function#apply): https://jsfiddle.net/k7ut4jgz/2/

This looks like a case of incorrect documentation; would you be willing to submit a pull request at https://github.com/jquery/api.jquery.com instead?

Member

gibson042 commented Nov 20, 2017

callbacks#fireWith was introduced in 1.7.0, and as far as we can tell has always required args to be an array-like object (which makes sense, since the method is analogous to function#apply): https://jsfiddle.net/k7ut4jgz/2/

This looks like a case of incorrect documentation; would you be willing to submit a pull request at https://github.com/jquery/api.jquery.com instead?

@gibson042 gibson042 closed this Nov 20, 2017

@gibson042 gibson042 added the Callbacks label Nov 20, 2017

@lock lock bot locked as resolved and limited conversation to collaborators Jun 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.