Skip to main content

Bug Tracker

Side navigation

#8981 closed feature (wontfix)

Opened April 26, 2011 11:47PM UTC

Closed June 06, 2011 10:03PM UTC

Support for array of types in bind, unbind, live, die, delegate, undelegate.

Reported by: rkatic Owned by:
Priority: low Milestone: 1.7
Component: event Version: 1.6rc1
Keywords: Cc:
Blocked by: Blocking:
Description

See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880

This is mostly to make API more consistent with next changes?

Patch: https://github.com/jquery/jquery/pull/349

Attachments (0)
Change History (14)

Changed April 27, 2011 03:59PM UTC by timmywil comment:1

component: unfiledevent
priority: undecidedlow
status: newopen

@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.

Changed April 28, 2011 12:38AM UTC by rkatic comment:2

_comment0: @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 jQuery.access like function. \ 1303951204291938

@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.

Changed April 28, 2011 03:39PM UTC by timmywil comment:3

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.

Changed May 22, 2011 07:27PM UTC by john comment:4

keywords: → 1.7-discuss

Nominating ticket for 1.7 discussion.

Changed May 22, 2011 09:04PM UTC by rwaldron comment:5

description: See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880 \ \ This is mostly to make API more consistent with next changes? \ \ Patch: https://github.com/jquery/jquery/pull/349See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880\ \ This is mostly to make API more consistent with next changes?\ \ Patch: https://github.com/jquery/jquery/pull/349

-1, This seems like a lot of repetitious code to accomplish something that could easily be accomplished by the user

Changed May 22, 2011 10:19PM UTC by rkatic comment:6

_comment0: Please note that this feature is more about future API consistency since #5479 and #7323 seams will be accepted by voting (https://spreadsheets.google.com/ccc?key=tm2LK6e1VAHCEJyw4rsspWg). 1306103029302768

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).

Changed May 23, 2011 12:44AM UTC by jaubourg comment:7

-1, what is the gain?

Changed May 23, 2011 04:38AM UTC by timmywil comment:8

+0, Not sure this will be needed.

Changed May 23, 2011 11:51AM UTC by rkatic comment:9

_comment0: I don't think there is any gain, except that it would allow something more programmatic binding (so not too relevant). I am not sure, but maybe this feature would be expected by the user once #5479 and #7323 will be applied. \ \ So yea, if you ask to me I would give a +0 to this too.1306151567488450

I don't think there is any gain, except that it would allow something more programmatic binding (so not too relevant). I am not sure, but maybe this feature would be expected by the user once #5479 and #7323 will be applied.

So yea, if you ask to me I also would give a +0 to this.

Changed May 24, 2011 09:39PM UTC by dmethvin comment:10

description: See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880\ \ This is mostly to make API more consistent with next changes?\ \ Patch: https://github.com/jquery/jquery/pull/349See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880 \ \ This is mostly to make API more consistent with next changes? \ \ Patch: https://github.com/jquery/jquery/pull/349

-1, Not sure where this is useful, and I'm not a fan of bloat caused by consistency that nobody needs.

Changed June 03, 2011 01:58PM UTC by john comment:11

description: See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880 \ \ This is mostly to make API more consistent with next changes? \ \ Patch: https://github.com/jquery/jquery/pull/349See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880\ \ This is mostly to make API more consistent with next changes?\ \ Patch: https://github.com/jquery/jquery/pull/349

-1, Not really keen on this.

Changed June 05, 2011 09:39PM UTC by ajpiano comment:12

description: See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880\ \ This is mostly to make API more consistent with next changes?\ \ Patch: https://github.com/jquery/jquery/pull/349See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880 \ \ This is mostly to make API more consistent with next changes? \ \ Patch: https://github.com/jquery/jquery/pull/349

+0, Don't see the need to apply a special case to everything else...

Changed June 06, 2011 02:48PM UTC by scottgonzalez comment:13

description: See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880 \ \ This is mostly to make API more consistent with next changes? \ \ Patch: https://github.com/jquery/jquery/pull/349See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880\ \ This is mostly to make API more consistent with next changes?\ \ Patch: https://github.com/jquery/jquery/pull/349

-1

Changed June 06, 2011 10:03PM UTC by rwaldron comment:14

description: See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880\ \ This is mostly to make API more consistent with next changes?\ \ Patch: https://github.com/jquery/jquery/pull/349See discussion starting at https://github.com/jquery/jquery/pull/77#issuecomment-1002880 \ \ This is mostly to make API more consistent with next changes? \ \ Patch: https://github.com/jquery/jquery/pull/349
keywords: 1.7-discuss
milestone: 1.next1.7
resolution: → wontfix
status: openclosed