I'm opening a child window through the parent window, and I want the child window to be displayed in full-screen mode.
+3
A:
There is no way to maximize the browser window to full-screen with JavaScript. This is considered a security restriction.
Sources:
- Stack Overflow - How to make in Javascript full screen windows (stretching all over the screen)
- Stack Overflow - To view the silverlight app in fullscreen mode(F11)
- SitePoint Forums - Trigger F11 using javascript
- Webmaster World - F11 Fullscreen using Javascript
The only workaround is to change the window size to fill the whole screen, as in the following example:
window.moveTo(0, 0);
window.resizeTo(screen.availWidth, screen.availHeight);
However note that this is not really full-screen mode -- just a maximized window.
Daniel Vassallo
2010-01-28 14:03:13