We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

Connection.onchange

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The Connection.onchange property represent an event listener for change events. These events occur when the connection information change.

Syntax

connection.onchange = funcRef;

Where funcRef is a function to be called when the change event occurs.

Specifications

Specification Status Comment
Network Information API
The definition of 'connection.onchange' in that specification.
Editor's Draft Initial specification

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support No support 12.0 moz No support No support No support
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support No support 12.0 moz No support No support No support

Gecko notes

  • The Network API can be disabled using the dom.network.enabled preference.
  • As of Gecko 12.0, the Network API is implemented for Android systems only. Support for Linux (bug 712442) and Windows (bug 721306) systems is in progress.
  • Before Gecko 14.0, navigator.mozConnection was not an instance of EventTarget, meaning that you couldn't use addEventListener() could be called. This has been fixed.

See also

Document Tags and Contributors

Contributors to this page: fscholz, teoli, tregagnon, Jeremie
Last updated by: fscholz,