Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

statuschange

The statuschange event is executed when the status of the Wifi connection changed. The possible statuses are:

connecting
Fires when the device starts the process of connecting to a network.
associated
Fires when the device has connected to an access point but do not yet have an IP address.
connected
Fires once we are fully connected to an access point and can access the internet.
disconnected
Fires when we either fail to connect to an access point (transition: associated -> disconnected) or when we were connected to a network but have disconnected for any reason (transition: connected -> disconnected).

General info

Specification
Wifi (Firefox OS specific) and WifiDirect (Firefox OS specific)
Interface
MozWifiStatusChangeEvent
Bubbles
No
Cancelable
No
Target
WifiManager, MozWifiP2pManager
Default Action
None

Properties

Property Type Description
target Read only EventTarget The event target (the topmost target in the DOM tree).
type Read only DOMString The type of event.
bubbles Read only boolean Does the event normally bubble?
cancelable Read only boolean Is it possible to cancel the event?
network Read only nsIVariant (object) Network object with an SSID field.
status Read only DOMString (string) Word describing the current status of the wifi manager. See possible values above.

Example

navigator.mozWifiManager.onstatuschange = function( event ) {
  console.log( "The connecttion to wifi network '" + event.network.SSID + "' switched to '" + event.status + "'." );
};

Document Tags and Contributors

 Contributors to this page: teoli, Jeremie, Sheppy, ethertank, louisremi
 Last updated by: teoli,