online

  • Revision slug: DOM/Mozilla_event_reference/online
  • Revision title: online
  • Revision id: 366643
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment Moved From Mozilla_event_reference/online to DOM/Mozilla_event_reference/online

Revision Content

The online event is fired when the browser has gained access to the network and the value of navigator.onLine switched to false.

Note: That event shouldn't be used to determine the availability of a particular website. Network problems or firewalls might still prevent that website to be reached.

General info

Specification
HTML5 Offline
Interface
Event
Bubbles
No
Cancelable
No
Target
DefaultView (<window>)
Default Action
None

Properties

{{OpenEventProperties()}}{{CloseEventProperties()}}

Revision Source

<p>The <code>online</code> event is fired when the browser has gained access to the network and the value of <code>navigator.onLine</code> switched to <code>false</code>.</p>
<div class="note">
  <strong>Note:</strong> That event shouldn't be used to determine the availability of a particular website. Network problems or firewalls might still prevent that website to be reached.</div>
<h2 id="General_info">General info</h2>
<dl>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Specification</dt>
  <dd style="margin: 0 0 0 120px;">
    <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#event-online">HTML5 Offline</a></dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Interface</dt>
  <dd style="margin: 0 0 0 120px;">
    Event</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Bubbles</dt>
  <dd style="margin: 0 0 0 120px;">
    No</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Cancelable</dt>
  <dd style="margin: 0 0 0 120px;">
    No</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Target</dt>
  <dd style="margin: 0 0 0 120px;">
    DefaultView (<code>&lt;window&gt;</code>)</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Default Action</dt>
  <dd style="margin: 0 0 0 120px;">
    None</dd>
</dl>
<h2 id="Properties">Properties</h2>
<p>{{OpenEventProperties()}}{{CloseEventProperties()}}</p>
<h2 id="Related_Events">Related Events</h2>
<ul>
  <li><a href="/en-US/docs/Mozilla_event_reference/offline"><code>offline</code></a></li>
</ul>
Revert to this revision