Easy Tutorial
❮ Prop Style Orphans Prop Style Animationtimingfunction ❯

ononline Event

Event Object

Example

Execute JavaScript when the browser starts working online:


Definition and Usage

The ononline event is triggered when the browser starts working online.

Tip: The opposite event of ononline is the onoffline event.

Tip: You can also use the navigator.onLine property to check if the browser is in online or offline mode.


Browser Support

The numbers in the table specify the first browser version that fully supports the event.

Event
ononline Not supported Deprecated in IE11 <br>8.0 3.0 Not supported Not supported

Syntax

In HTML:

In JavaScript:

In JavaScript, using the addEventListener() method:

Note: Internet Explorer 8 and earlier versions do not support the addEventListener() method.


Bubbles: No
Cancelable: No
--- ---
Event Type: Event
--- ---
Supported HTML Tags: <body>
--- ---
❮ Prop Style Orphans Prop Style Animationtimingfunction ❯