Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

onLine property

Retrieves a value indicating whether the system is online.

HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 5.6.10

 

Syntax

HRESULT value = object.get_onLine(* p);

Property values

Type: VARIANT_BOOL

VARIANT_TRUE (true)

System is online.

VARIANT_FALSE (false)

System is offline.

Standards information

Remarks

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

  • the system is able to communicate with the network
  • the system is not in global offline mode (Users can modify the global offline state by choosing Work Offline on the File menu.)
If either of these conditions is false, the IOmNavigator::onLine property returns false.

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

IOmNavigator::onLine returns true if the WWAHost.exe can contact the network, otherwise, it returns false.

A Windows Store app using JavaScript uses event listeners (IEventTarget::addEventListener) to monitor online and offline events that fire when the state of the window object changes. The offline event fires when the IOmNavigator::onLine property changes from true to false. The online event fires when the IOmNavigator::onLine property changes from false to true.

See also

Reference
HTMLElementEvents3::onoffline
HTMLElementEvents3::ononline
IEventTarget::addEventListener
Conceptual
Connectivity Enhancements in Internet Explorer 8

 

 

Community Additions

ADD
Show:
© 2015 Microsoft