WebAPI/NetworkAPI

From MozillaWiki
< WebAPI
Revision as of 21:04, 1 December 2011 by Mounir.lamouri (talk | contribs) (first draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Device API specification

The DAP WG (W3C) has specification sharing this proposal goal [1]. Our proposal might or might not look like it for the moment. Suggestions and comments will be submitted to the Device Status Task Force [2].

[1] http://dev.w3.org/2009/dap/netinfo/ [2] http://lists.w3.org/Archives/Public/public-device-status/

Status

The proposed specification doesn't have a working implementation yet. The implementation will be done in {bug|677166}.

Demo

TBD

Proposed API

There is an object in window.navigator named mozBattery with the following interface:

 interface Connection
 {
   // Estimated speed (in MB/s) of the current connection.
   readonly attribute unsigned long speed;
   // Return whether the current connection is restricted (like quota, pay per use, etc.).
   readonly attribute boolean       restricted;
 }

Considered changes