Firefox extension: window activate/deactive event

前端 未结 2 1548
予麋鹿
予麋鹿 2021-01-28 03:38

in my Firefox extension I try to handle the event when the browser window is activated or deactivated. Adding the events \"activate\" and \"deactivate\" to the window does basic

2条回答
  •  忘掉有多难
    2021-01-28 04:36

    I finally decided to user timer-based solution: I don't handle DEACTIVE events at once, but only if there weren't any ACTIVATE events after, say ten, seconds. So only after ten seconds I consider a window as deactivated. Resizing/Moving is typically done in way less than 10 seconds. No the optimal solution, of course, but serves my purpose sufficiently.

提交回复
热议问题