Opened 11 years ago
Closed 11 years ago
#11693 closed enhancement (worksforme)
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.
Change History (3)
comment:1 Changed 11 years ago by
Owner: | set to gravof |
---|---|
Status: | new → pending |
comment:2 Changed 11 years ago by
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. :)
comment:3 Changed 11 years ago by
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?