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

99
Vistas
visibilitychange fires when page gets reloaded or navigated to other page
  document.addEventListener("visibilitychange", onVisibilityChange, {
    passive: true,
  });

This will fire even when someone navigates away from my page. Ofcourse this is logical. But is there a way to check if someone navigates away?

Edit: What i want is to listen if the user switches to another tab or places the window in the background. this work with visibilityChange but it also fires when the user reloads the page or navigates back and forth in the history. But this is behaviour when i don't want to fire the event

about 4 years ago · Juan Pablo Isaza
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