Side navigation
#11693 closed enhancement (worksforme)
Opened May 04, 2012 04:08AM UTC
Closed May 05, 2012 02:05AM UTC
Provide an API to only remove non-delegated event handlers
Reported by: | gravof | Owned by: | gravof |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If you pass an event type to .off()
, all event handers (delegated & non-delegated) of that type are removed.
If you pass an event type and **
has the selector param, all delegated event handlers of that type are removed.
So what about removing only non-delegated event handlers? It seems that jQuery currently doesn't provide an API to do that, but correct me if I was wrong.
Attachments (0)
Change History (3)
Changed May 04, 2012 01:52PM UTC by comment:1
owner: | → gravof |
---|---|
status: | new → pending |
Changed May 05, 2012 01:40AM UTC by comment:2
status: | pending → new |
---|
To be honest, I later found a way to workaround it, so I don't need this feature anymore, but I guess when the API is asymmetrical, somebody will find a use case and ask about it.
But it's ok to me if you want to deprioritize it. :)
Changed May 05, 2012 02:05AM UTC by comment:3
resolution: | → worksforme |
---|---|
status: | new → closed |
Okay, I'll close this. Post a note back with your use case if you get a chance. In most cases it would be better to use an event class name anyway, such as click.myPlugin
.
It is not there because nobody ever had a use case. What is your use case?