Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

121
Vistas
is there any way to enter into fullscreen mode onload of page?

I am working on quiz and want to convert the screen into fullscreen mode on load of page for specific time, is there any way to achieve this or any alternative?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

User interaction is required to enter full-screen mode. This is a security feature.

Imagine being able to force a popup window of some kind to go full screen, lock the mouse pointer, and play an ad without permission. Having an "Enable Full Screen" link or button whose visibility is toggled in the "Change Full Screen" event handler in the the documentation seems like a pragmatic/better approach.

Even if you'll try, you will get the following error message

Failed to execute 'requestFullScreen' on 'Element': API can only be initiated by a user gesture.

So, It's not possible to load a page on fullscreen mode but you can use the following code to trigger it on some action:

<script>
/* Get the documentElement (<html>) to display the page in fullscreen */
var elem = document.documentElement;

/* View in fullscreen */
function openFullscreen() {
  if (elem.requestFullscreen) {
    elem.requestFullscreen();
  } else if (elem.webkitRequestFullscreen) { /* Safari */
    elem.webkitRequestFullscreen();
  } else if (elem.msRequestFullscreen) { /* IE11 */
    elem.msRequestFullscreen();
  }
}

/* Close fullscreen */
function closeFullscreen() {
  if (document.exitFullscreen) {
    document.exitFullscreen();
  } else if (document.webkitExitFullscreen) { /* Safari */
    document.webkitExitFullscreen();
  } else if (document.msExitFullscreen) { /* IE11 */
    document.msExitFullscreen();
  }
}
</script>

Reference: w3Schools - Full Screen

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda