JavaScript requestFullScreen() Method Tutorial

In this section, we will see what the requestFullScreen() method is and how to use it in JavaScript.

What is Element requestFullScreen() Method in JavaScript?

The JavaScript Element requestFullScreen() method is used to set an element like <video> into fullscreen mode.

Note: you can use the exitFullscreen() method to exit from the fullscreen mode.

JavaScript requestFullScreen() Method Syntax:

element.requestFullScreen();

JavaScript requestFullScreen() Method Parameter

The method does not take an argument.

JavaScript requestFullScreen() Method Return Value

The method does not return a value.

Example: using requestFullScreen() method in JavaScript

See the Pen using requestFullScreen() method in JavaScript by Omid Dehghan (@odchan1) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies