Is there a reliable way to determine if a browser tab or window is inactive or not in focus?

后端 未结 5 2219
一整个雨季
一整个雨季 2020-12-30 11:02

I\'ve got a javascript timer that is making XMLHTTP requests on a constant basis (once every 10 seconds). I\'d love to be able to pause the timer when the window or tab los

5条回答
  •  既然无缘
    2020-12-30 11:27

    
    

提交回复
热议问题