Opened 12 years ago
Closed 12 years ago
#8981 closed feature (wontfix)
Support for array of types in bind, unbind, live, die, delegate, undelegate.
Reported by: | Robert Katić | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.7 |
Component: | event | Version: | 1.6rc1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880
This is mostly to make API more consistent with next changes?
Change History (14)
comment:1 follow-up: 2 Changed 12 years ago by
Component: | unfiled → event |
---|---|
Priority: | undecided → low |
Status: | new → open |
comment:2 Changed 12 years ago by
@timmywil: I am not convinced to introduce a wrapper function like jQuery.access. Event methods can handle plain objects too, but attr/removeAttr/data/removeData will probably not.
Something more then this would be probably an overhead or require more changes then needed:
jQuery.words = function( obj ) { if ( typeof obj === "string" ) { return obj.split( rspaces ); } return obj || []; }
My patch was more an intention to demonstrate how such feature would be easy to introduce, specially without a function like jQuery.access.
comment:3 Changed 12 years ago by
It's true. I wasn't saying your code is not good. It just may not fit at this time. I could very well be wrong, but considering that quite a bit will be changing, I think we will be able to reduce the overhead, which would be the point of having a wrapper function similar to access. By the way, this would not really apply to attr and data as we can't really set or get attributes and data with space-separated lists or arrays of keys. It would apply to removeAttr/removeData/unbind/die/undelegate. My thought was if DaveMethvin goes through with changes that have been discussed for event.js, this could all be quite clean.
comment:5 Changed 12 years ago by
Description: | modified (diff) |
---|
-1, This seems like a lot of repetitious code to accomplish something that could easily be accomplished by the user
comment:6 Changed 12 years ago by
Please note that this feature is more about future API consistency since #5479 and #7323 will be likely accepted by voting (https://spreadsheets.google.com/ccc?key=tm2LK6e1VAHCEJyw4rsspWg).
comment:9 Changed 12 years ago by
comment:10 Changed 12 years ago by
Description: | modified (diff) |
---|
-1, Not sure where this is useful, and I'm not a fan of bloat caused by consistency that nobody needs.
comment:12 Changed 12 years ago by
Description: | modified (diff) |
---|
+0, Don't see the need to apply a special case to everything else...
comment:14 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Keywords: | 1.7-discuss removed |
Milestone: | 1.next → 1.7 |
Resolution: | → wontfix |
Status: | open → closed |
@rkatic: I think we were thinking of writing a wrapper function that works like jQuery.access for all of the functions that need this feature to dry up the code. Also, I believe the event module will be majorly refined in 1.7 so the patch you've made may not be workable when that comes around.