Dag Sunde wrote:
Is it possible to detect if the user minimizes the browser-window?
I do some polling, and want to stop it while the window in minimized,
but not when it only is blurred...
There is no event that fires when the browser window is being minimized
but at least Mozilla/Firefox changes
window.outerWidth
window.outerHeight
when the window is minimized.
For instance here with Firefox 1.5 on Windows XP a minimized browser
window the browser reports the dimensions as
outerWidth: 160
outerHeight: 31
So your polling code could check for such a low outerHeight and stop
polling as long as the outerHeight is lower than a certain limit.
But note that I have not checked on other platforms, nor with other
browsers.
--
Martin Honnen
http://JavaScript.FAQTs.com/