-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
While messing with NativeView#undelegate I realized that it's only possible to undelegate using a selector when that selector matches exactly the string passed to delegate. It doesn't do matching or sub-selections.
Let's say you called view.delegate('click', '*') and then tried to view.undelegate('click', 'div'). Or view.delegate('click', 'h1, div'), or any sub-selector. Since the strings don't match, we wouldn't be able to undelegate for you. Selector strings don't work that way.
I'm tempted to say "screw it". Undelegating isn't that common of a use case. We'd have to implement the better part of Sizzle to get this behavior (or call matches over a querySelectorAll ElementList). Is it worth solving?