1window.addEventListener("offline", (event) => {
2 const statusDisplay = document.getElementById("status");
3 statusDisplay.textContent = "OFFline";
4});
5
6window.addEventListener("online", (event) => {
7 const statusDisplay = document.getElementById("status");
8 statusDisplay.textContent = "Online";
9});