pub fn use_window_focus() -> Signal<bool>
Reactively track window focus with window.onfocus and window.onblur events.
window.onfocus
window.onblur
Link to Demo
let focused = use_window_focus();
On the server this returns a Signal that is always true.
Signal
true