showing results for - "check if connection established with router js"
Agustina
17 Jan 2017
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});