online

Prev Next

Description

Type: Boolean

Returns whether or not a live Internet connection is available.


Examples

// check active Internet connection
if (network.online)
    debug.log("Connected to Internet.");
else
    debug.log("Disconnected from Internet.");
JavaScript

Remarks

Use this property when your scripts need to test for an active Internet connection on the host device. This can be useful if you need to communicate with an external service or download (i.e. file) a resource from the Internet.