Opened 9 years ago
Closed 9 years ago
#14593 closed feature (worksforme)
cannot merge callbacks: jQuery.Callbacks().add( jQuery.Callbacks() )
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | jaubourg | |
Blocked by: | Blocking: |
Description
jQuery.Callbacks().add() can add either a function or an array of functions, but it still does not treat another jQuery.Callbakcs() as a list of callbacks that can be added
Change History (5)
comment:1 Changed 9 years ago by
Cc: | jaubourg added |
---|
comment:2 Changed 9 years ago by
imlementing inverted logic is good enough, eg. method var c1, c2; jQuery.Callbacks() c1.addAllTo(c2)
so c1 would add its callback array to c2
comment:3 Changed 9 years ago by
I fail to see the gain here. I'd expect c1.add( c2.fire );
to cover any use case.
comment:4 Changed 9 years ago by
Good point. That was all I needed, just didn't see it so far. Can be closed as invalid. Would be useful to add an example to api.jquery.com
comment:5 Changed 9 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Since there's something in the API that (sorta) does it already, let's close this as worksforme ;)
Jaubourg, what do you think of this feature? I could see it being useful, but I imagine it could require more than trivial changes to the source (because the list is currently inaccessible by another jQuery.Callbacks()).