Packagedom.objects
Interfacepublic interface NavigatorOnLine
Implementors Navigator

Objects implementing the Navigator interface must also implement the NavigatorOnLine interface. This interface is defined separately so that other specifications can re-use parts of the Navigator interface.

See also

W3C - HTML 5: NavigatorOnLine


Public Properties
 PropertyDefined By
  DOM 0 onLine : Boolean
[read-only] Returns a boolean indicating whether the browser is working online.
NavigatorOnLine
Property Detail
DOM 0 onLineproperty
onLine:Boolean  [read-only]

Introduced in: DOM 0 
Modified in: HTML 5 

Returns a boolean indicating whether the browser is working online.

Note (IE): In Windows Internet Explorer 8 and later, the onLine property returns true if both of the following conditions are true:

If either of these conditions is false, the onLine property returns false.

Note (IE): In Microsoft Internet Explorer 4.0 through Internet Explorer 7, the onLine property indicates whether the system is in global offline mode. It does not indicate whether the system can communicate with the network.


Implementation
    public function get onLine():Boolean

See also


Example
alert(navigator.onLine ? "You're online" : "You're offline");