(JS Interop) How do I remove an event listener from an element assigned via Jsinterop. #60955
Unanswered
GlacierFox
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do I remove an event listener after it's been added via JSInterop?
Here's the javascript (Typescript).
Of course I need a reference to the original event callback function to remove it but how and where would I store that? Is it actually possible?
I'm calling this every time a specific modal is loaded on a multi-use component and im assuming I'd be sort of stacking these event listeners if I don't remove them when I close the modal. (the component isn't being fully destroyed)
Bear with me I don't use javascript very often 😅
Beta Was this translation helpful? Give feedback.
All reactions