pub fn on_unload(f: impl FnMut(Event) + 'static) -> EventCallback
Add a unload event handler at the window level.
unload
This only has an effect on WASM targets.