user254582
user254582

Reputation: 121

How to show a child window full-screen mode?

I'm opening a child window through the parent window, and I want the child window to be displayed in full-screen mode.

Upvotes: 2

Views: 2031

Answers (1)

Daniel Vassallo
Daniel Vassallo

Reputation: 344301

There is no way to maximize the browser window to full-screen with JavaScript. This is considered a security restriction.

Sources:


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.

Upvotes: 3

Related Questions