+ 6
How to make a code in a web that detects the WiFi status?
3 Answers
+ 9
Credits to Kirk Schafer!!đđ
https://code.sololearn.com/WLU6WwFiXw7B/?ref=app
+ 3
alert(navigator.connection)
// [object NetworkInformation]
// dump properties
var obj=navigator.connection;
for (var i in obj)
document.write("<b>" + i + ":</b> " + obj[i] + "<br />")
Reference:
https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API#Detect_connection_changes
Implementation note: Connection type is "unknown" in-app, "wifi" in the browser.
+ 2
you can us navigator in js