Is it possible to detect whether the web browser window is currently covered by another window?
document.hidden and document.visibilityState only changes state on switching tabs or when the entire window is minimized.
document.hasFocus() returns false if the window is visible but not in focus (e.g. the focus is on the taskbar)
Nope, that's not possible.
There's no way in JavaScript to know how visible the window is.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With