daattali / shinyjs

💡 Easily improve the user experience of your Shiny apps in seconds
https://deanattali.com/shinyjs
Other
728 stars 119 forks source link

Allow to remove the events #244

Closed jcubic closed 2 years ago

jcubic commented 2 years ago

This is like a major flaw in this library I don't see a way to remove the event that was added using shinyjs.

Is there any way to remove everything that is attached to an element? Including mutation observer helpers.

daattali commented 2 years ago

Can you please be more specific, shiny js has a lot of functionality, what "event" are you wanting to remove?

jcubic commented 2 years ago

I mean every DOM event is the same you have a way to add a click event, but no way to remove it.

At least it's not documented how to remove the events. I'm not sure if there are other events besides DOM events.

daattali commented 2 years ago

That's a valid concern. I'll think about how to best add a mechanism to remove events.

daattali commented 2 years ago

I added a function removeEvent

jcubic commented 2 years ago

Awesome, thanks.