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 7bd23fb commit 205fe91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion public/mon-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
});

0 comments on commit 205fe91

Please sign in to comment.