From 205fe9159dae0b8e6ee315a9635ca310d20b1d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Guillaume?= Date: Sun, 18 Feb 2024 05:01:11 +0100 Subject: [PATCH] feat: test beforeunload compatibility --- public/mon-script.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/mon-script.js b/public/mon-script.js index f8a667d..8f035f4 100644 --- a/public/mon-script.js +++ b/public/mon-script.js @@ -22,5 +22,8 @@ document.addEventListener("unload", () => { - alert("unload") + console.log("unload") + fetch('https://jsonplaceholder.typicode.com/todos/1') + .then(response => response.json()) + .then(json => console.log(json)) });