Enabling full screen in Javascript.

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.

Leave a comment

Design a site like this with WordPress.com
Get started