Devone

Is it Possible to Detect the Visibility of a Tab in Firefox?

Asked by Devone 2 years ago firefox detect tab


Pablo G
0
 
You could use the following:

Var isFocused = true;

window.onblur=function(){
  if(isFocused==true){
    isFocused=false;
  }
}

window.onfocus = function(){
  isFocused = true;
}

If you need to call an action and "do something" after the tab's visibility is detected then only do it when the isFocused is true because that is when your web pages' tab is focused.

by Pablo G 2 years ago

Answer this question

Is it Possible to Detect the Visibility of a Tab in Firefox?

0 errors found:

 
0