HF RL Explorer

There is a critical issue with event listener cleanup when using m.route in a Mithril application. When…

There is a critical issue with event listener cleanup when using m.route in a Mithril application. When…: a task in LegoFlow-SWE (Harbor dataset). The problem occurs because m.route assigns listeners to window.onpopstate and window.onhashchange , which are not properly cleaned up when calling…

The task

The problem occurs because `m.route` assigns listeners to `window.onpopstate` and `window.onhashchange`, which are not properly cleaned up when calling `m.mount(mountPoint, null)` to unmount the application. This causes the event listeners to persist and interfere with routing in other frameworks.

Part of Lego-X/LegoFlow-SWE.