From d7b5c4a4efce703a17e1f08c3315015a42acac99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Guillaume?= Date: Sun, 18 Feb 2024 06:14:26 +0100 Subject: [PATCH] feat: test beforeunload compatibility --- public/mon-script.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/mon-script.js b/public/mon-script.js index 8eb0ca7..962a35e 100644 --- a/public/mon-script.js +++ b/public/mon-script.js @@ -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')) })()