The tab switch
document.hiddenListens for visibilitychange and reads document.hidden from the Page Visibility API the moment you open another tab.
Always visible. The event never reaches the page, and even prototype-level checks get the same answer.