Use: document.hidden ; it returns a Boolean value, if the page was visible false, otherwise it is true;
document.hidden; // false
Note : If the page is opened, the browser is minimized, or the user switches to another tab, then true;
Use: document.hidden ; it returns a Boolean value, if the page was visible false, otherwise it is true;
document.hidden; // false
Note : If the page is opened, the browser is minimized, or the user switches to another tab, then true;