Is there any way of reliably detecting if a browser is running in full screen mode? I'm pretty sure there isn't any browser API I can query, but has anyone worked it out by inspecting and comparing certain height/width measurements exposed by the DOM? Even if it only works for certain browsers I'm interested in hearing about it.
If you really want to do it reliably, have you considered that max width/height in a mobile device, for example, is less than any mode a sane desktop user will probably have?
The question is why do you need it?
Maybe there is another solution to your problem.
What about determining the distance between the viewport width and the resolution width and likewise for height. If it is a small amount of pixels (especially for height) it may be at fullscreen.
However, this will never be reliable.
Opera treats full screen as a different CSS media type. They call it Opera Show, and you can control it yourself easily:
@media projection {
/* these rules only apply in full screen mode */
}
Combined with Opera@USB, I've personally found it extremely handy.
What I really dislike is all of these counter-questions - "what are you trying to achieve? maybe there is another way?" etc.
People, if you know the answer or can advise, please do so. Otherwise, sit tight and wait until someone else does. Please..
And thanks to Alex who came up with a way of achieving it - not a perfect way, as he himself pointed out, but a way nonetheless.
Hi By default when we works in Full Screen mode (F11) the client rectangle and the window rectangle suppose to be equal. From some reason in IE6 there is border different 2 pixel in width and 2 pixel in Height