Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

66
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?')
        }

       
}
7 months ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos