Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have to make when the page load the browser should go Fullscreen by autoclicking the button on the webpage.

I have this code for fullscreen ..

What I have tried:

https://jsfiddle.net/Lxn4etvf/
Posted
Updated 4-Apr-19 2:44am

1 solution

Simple: You can't.
Note: This method must be called while responding to a user interaction or a device orientation change; otherwise it will fail.

Without that restriction, every spam and scam site on the net would be going full-screen as soon as they loaded.

And before you ask: no, there is no way around this restriction. And no, "it's a requirement from the customer" doesn't change that. :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900