Skip to content

Commit

Permalink
feat: test beforeunload compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Leoglme committed Feb 18, 2024
1 parent 0dca09c commit d7b5c4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions public/mon-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@

// Écoute des événements beforeunload pour détecter lorsque l'utilisateur quitte la page
window.addEventListener('beforeunload', () => onLeave('beforeunload'))

// For ios
window.addEventListener('pagehide', () => onLeave('pagehide'))
})()

0 comments on commit d7b5c4a

Please sign in to comment.