Hi, i need this, when internet is available, then i want to show add, but how to get, that internet is on?
Try the Browser object's 'Is online' condition.
Develop games in your browser. Powerful, performant & highly capable.
I tried this, but it does not work for me :/ If i use "Is online", action work al the time, even if i am online or not. If I use inverted "Is online" action work never
It's up to the browser how it defines "online" and sometimes just being connected to a LAN counts. It might also only update it when next making a network request. See: https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine.onLine
If you want a more robust way to check, you need to invent your own system, such as AJAX requesting a server to see if it is reachable.