Including a parameter to allow events to be caught in the capturing phase #94

Closed
swervo opened this Issue Feb 14, 2011 · 3 comments

Projects

None yet

3 participants

@swervo

Could bind support event capturing thus:

$("#elementId").bind("click", callbackFunctionName, true);

Where "true" means "use capturing" please?

Looking at the source code event listeners are always added with useCapturing set to false:

element.addEventListener(handler.e, delegate || fn, false);

@madrobby
Owner

Supporting something like this would be great, we'd need to find a way not to break jQuery's API tho (afaik jQuery doesn't support this at all).

@mislav mislav was assigned Apr 7, 2012
@mislav
Collaborator

You can setup capture if you call zepto's semi-private add() method:

$.event.add(node, events, fn, selector, getDelegate, capture)
@madrobby
Owner

Closing stale ticket. Feel free to reopen, especially if there's new information or a proposed patch.

@madrobby madrobby closed this Sep 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment