The Window interface has a fullscreen property which tells whether the window is displayed in fullscreen mode or not.
Syntax:
BoolVal = windowReference.fullScreen;
Return value:
- Boolean
- True: If windows is in fullscreen mode.
- False: If windows are not in fullscreen mode.
Example :
<!DOCTYPE html> <html> <head> <title> Window fullscreen property </title> </head> <body> <center> <h1 style="color:green;"> GeeksForGeeks </h1> <h2>Window fullscreen property</h2> <button onclick="GFGfun();">press</button> <script> function GFGfun() { alert(window.fullScreen); } </script> </center> </body> </html> |
chevron_right
filter_none
Output:
Window not in fullscreen:

Window in fullscreen:

Browser support:
- Firefox 3+
Recommended Posts:
- Web Window API | Window locationbar property
- Web Window API | Window scrollbars property
- Web Window API | Window personalbar property
- Web Window API | Window statusbar property
- Web Window API | Window toolbar property
- Web Window API | Window menubar property
- p5.js | fullscreen() function
- How to set fullscreen iframe?
- Differences between Web Services and Web API
- Web 1.0, Web 2.0 and Web 3.0 with their difference
- Web API | DOMRect height property
- Web Audio API | AudioContext outputLatency property
- Web ImageData API | ImageData.height property
- Web Audio API | AudioNode numberOfOutputs property
- Web Audio API | AudioNode numberOfInputs Property
- Web Audio API | AudioNode context property
- Web HTMLStyleElement API | StyleElement type property
- Web StyleElement API | StyleElement media property
- Web HTMLElement API | Element accessKeyLabel property
- Web HTMLCanvasElement API | Canvas Element width property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

