How to switch a web browser to full screen using JavaScript?

I am developing a web application and improving user experience. I want to switch the browser in full screen. Any ideas how to do this (except that the user does it himself)?

+2
source share
4 answers

It is possible to use FullScreenApi , which is supported at least in Chrome 27, FF 21, Safari 5.1 and Opera 16. It will also be supported by IE 11. There is also a small wrapper for the API.

+3
source
Javascript.resizeTo(screen.width,screen.height) 
+1
source

Impossible. If you really want this, you need to open a new window:

var win = window.open ('html.file', 'Name', 'fullscreen = true');

0
source

You cannot do full-screen mode, but you can simply resize the window to the available width and height of the screen.

0
source

Source: https://habr.com/ru/post/1344397/


All Articles