api.jquery.com icon indicating copy to clipboard operation
api.jquery.com copied to clipboard

callbacks.remove(callbacks) argument can be comma separated list not array

Open 70ray opened this issue 4 years ago • 3 comments

The documentation for the argument suggests it can be an array like: callbacks.remove([func1, func2]). This does not work. But callbacks.remove(func1, func2) does. The documentation should clarify this.

70ray avatar Jan 29 '21 20:01 70ray

Would you like to submit a PR? That page is defined here: https://github.com/jquery/api.jquery.com/blob/main/entries/callbacks.remove.xml

mgol avatar Feb 19 '21 19:02 mgol

Thanks, In my test it seemed the documentation did not agree with what the code actually did but I am not certain which should be changed and haven't looked into other similar cases to see if there is any consistent pattern.

70ray avatar Mar 11 '21 08:03 70ray

The current behavior has been in the code forever so it's a de-facto standard, no one could have realistically depended on the documented version. The fix needs to land in the documentation.

mgol avatar Mar 11 '21 11:03 mgol