mozilla

Revision 433309 of WifiManager

  • Revision slug: Web/API/WifiManager
  • Revision title: WifiManager
  • Revision id: 433309
  • Created:
  • Creator: dbruant
  • Is current revision? No
  • Comment first shot

Revision Content

{{ non-standard_header() }}

{{ B2GOnlyHeader2('installed') }}

Summary

The WifiManager API provides access to the wifi device capability

Interface

interface WifiManager {
    readonly attribute boolean enabled;
    readonly attribute string macAddress;
    readonly attribute ? connection;
    readonly attribute ? connectionInformation;

    attribute nsIDOMEventListener onstatuschange;
    attribute nsIDOMEventListener connectionInfoUpdate;
    attribute nsIDOMEventListener onenabled;
    attribute nsIDOMEventListener ondisabled;

    DOMRequest getNetworks();
    DOMRequest getKnownNetworks();
    DOMRequest associate( ? network);
    DOMRequest forget( ? network);
    DOMRequest wps( ? detail);
    DOMRequest setPowerSavingMode(boolean enabled);
};

Properties

{{domxref("WifiManager.enabled")}}
Indicates whether the wifi is on.

Event handlers

{{domxref("WifiManager.onenabled")}}
A handler for the {{event("enabled")}} event; It is triggered when the wifi has been turned on.

Methods

{{domxref("WifiManager.enable()")}}
Turns on the wifi on. Returns a {{domxref("DOMRequest")}} for the success or error of the operation.

Revision Source

<p>{{ non-standard_header() }}</p>
<p>{{ B2GOnlyHeader2('installed') }}</p>
<h2 id="Summary">Summary</h2>
<p>The WifiManager API provides access to the wifi device capability</p>
<h2>Interface</h2>
<pre>
interface WifiManager {
    readonly attribute boolean enabled;
    readonly attribute string macAddress;
    readonly attribute ? connection;
    readonly attribute ? connectionInformation;

    attribute nsIDOMEventListener onstatuschange;
    attribute nsIDOMEventListener connectionInfoUpdate;
    attribute nsIDOMEventListener onenabled;
    attribute nsIDOMEventListener ondisabled;

    DOMRequest getNetworks();
    DOMRequest getKnownNetworks();
    DOMRequest associate( ? network);
    DOMRequest forget( ? network);
    DOMRequest wps( ? detail);
    DOMRequest setPowerSavingMode(boolean enabled);
};
</pre>
<h2 id="Properties">Properties</h2>
<dl>
  <dt>
    {{domxref("WifiManager.enabled")}}</dt>
  <dd>
    Indicates whether the wifi is on.</dd>
</dl>
<h3 id="Event_handlers">Event handlers</h3>
<dl>
  <dt>
    {{domxref("WifiManager.onenabled")}}</dt>
  <dd>
    A handler for the {{event("enabled")}} event; It is triggered when the wifi has been turned on.</dd>
</dl>
<h2 id="Methods">Methods</h2>
<dl>
  <dt>
    {{domxref("WifiManager.enable()")}}</dt>
  <dd>
    Turns on the wifi on. Returns a {{domxref("DOMRequest")}} for the success or error of the operation.</dd>
</dl>
Revert to this revision