window.addEventListener("online", function () { new bs5.Toast({ body: 'Hurray!Internet is connected', header: `<h6 class="mb-0"> online </h6>`, placement: 'bottom-left', }).show(); }); window.addEventListener("offline", function () { new bs5.Toast({ body: 'Opps! Internet is disconnected', header: `<h6 class="mb-0"> Offline </h6>`, placement: 'bottom-left', }).show(); });
but I want to internet connection status when api failed due to internet disconnected because I don't want any proper process for checking connection status
navigator.online
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)