onLine
all
alt
ch
dir
id
min
rel
top
url
URL
urn
TOC
Collapse the table of content
Expand the table of content

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

JavaScript

p = object.onLine

 

Property values

Type: Boolean

true (true)

System is online.

false (false)

System is offline.

Standards information

Remarks

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

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

See also

clientInformation
navigator
Reference
onoffline
ononline
addEventListener

 

 

Show:
© 2017 Microsoft