electron-spellchecker
electron-spellchecker copied to clipboard
Unsubscribing on unload event
I am currently using a 'beforeunload' event to track when I should unsubscribe from the spellchecker and the contextMenuListener. I am unsubscribing from these events because if I do not and then I resubscribe, it has led to crashes in the past.
The app occasionally receives beforeunload events that get cancelled, leaving me with no spellchecker or menu.
- Is there a better event to be unsubscribing on?
- In the latest version or future versions (I believe I'm on 1.6) will there be an automatic cleanup for these events?
- Has anyone else had trouble with this sort of issue? If it's a more widespread problem, I would love to contribute to a solution for all.
How about 'unload' event? It's fired after beforeunload and is not cancelable.