I want my javascript to be trigged when:
- The current IE tab is switched out when multiple IE tabs are open.
- When the current IE tab is closed.
- I don't want my JS code be trigged by the in-page pops up dialogs.
- When the whole IE window closed.
The lose focus event may not work for me because there are pop up diaglogs in my page, so when it pops out, the IE tab will lose focus, but since the tab is not switched or closed, I don't want my javascript to be trigged here.
Is there any solution? I am wondering if there's something like entering tab / leaving tab, or tab-switching events?
Some interesting links, but not resolve my question.
Is there a way to detect if a browser window is not currently active?