mozilla
Your Search Results

    onstatusChange Redirect 2

    The onstatuschange handler 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
    Firefox OS specific
    Interface
    Event
    Bubbles
    No
    Cancelable
    No
    Target
    navigator.wifi
    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.wifi.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: Sheppy
    Last updated by: Sheppy,