We are working on a web app in which we need to fire an event whenever the user closes the laptop lid or locked the screen, for this we are using VisibilityAPI , now this API listen when the window hides, we need to excl…...we exclude the minimize and tab switch event and only listen...fired only when the interested tab is visible on screen, which means...