I need to de-register event handlers from an external library. I register and unregister them via dispatch('dom:register') and dispatch('dom:unregister'). The problem is that when onRemove is called the DOM elements have already been removed and the deregistration fails. Is there a hook called when the component is getting removed but before the DOM actually goes away?
I need to de-register event handlers from an external library. I register and unregister them via
dispatch('dom:register')
anddispatch('dom:unregister')
. The problem is that when onRemove is called the DOM elements have already been removed and the deregistration fails. Is there a hook called when the component is getting removed but before the DOM actually goes away?