JSFiddle - React, Tailwind, and code Playground
JavaScript
function goodbye(e) {
console.log("Ping me" + e.f5 === 116);
if (e.f5 === 116) {
alert("Ping me" + e.f5 === 116);
}
}
window.onbeforeunload = goodbye;
function goodbye(e) {
console.log("Ping me" + e.f5 === 116);
if (e.f5 === 116) {
alert("Ping me" + e.f5 === 116);
}
}
window.onbeforeunload = goodbye;