Enabling full screen in Javascript.

Javascript Jeep๐Ÿš™๐Ÿ’จ
1 min readJul 20, 2019

--

Learn how to enable full screen using Javascript.

We can use requestFullscreen() method on any element to make the element as full screen. requestFullscreen() method makes an asynchronous request to make the element be displayed in full-screen mode.

We can check if any other element is already in fullscreen mode by using document.fullscreenElement .

To exit fullscreen we can use document.exitFullscreen()

The above code will make the document to go full screen. To make a video as fullscreen

If you find this helpful surprise ๐ŸŽ me here.

Share if you feel happy ๐Ÿ˜ƒ ๐Ÿ˜† ๐Ÿ™‚ .

Follow Javascript Jeep๐Ÿš™ if you feel worthy.

--

--

Javascript Jeep๐Ÿš™๐Ÿ’จ
Javascript Jeep๐Ÿš™๐Ÿ’จ

No responses yet