• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

280
Vistas
Detect exit from application in browser Vuejs

I am trying to implement a warning right before user exits the application. It's not on browser closing or tab closing. I want to implement this when user keep tapping on back button until app is about to exit. Please let me know how to do this. I am using Vue2 with composition api plugin. Highly appreciate your help. Thanks !

I already tried below in App.vue. Didn't work

 setup() {
        window.onbeforeunload = function () {
            confirm('Are you sure you want to close the window?')
        }

       
}
almost 3 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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda