W3C home > Mailing lists > Public > public-device-apis@w3.org > July 2011

[battery] ISSUE-114 (was: [contacts] Proposed text to clarify the relationship between low and critical conditions (ISSUE-114))

From: Francois Daoust <fd@w3.org>
Date: Thu, 21 Jul 2011 17:27:37 +0200
Message-ID: <4E284569.5010309@w3.org>
To: public-device-apis@w3.org
Right, so... If I don't use the right tag in the subject, email tagging becomes kind of useless, doesn't it? Sorry about that, the email was of course intended for the battery spec.

Francois.


On 07/21/2011 01:41 PM, Fran├žois Daoust wrote:
> Hi dap-ers,
>
> I said I'd come up with some text to address ISSUE-114 during the F2F: "Battery spec should note relative ordering of battery low versus battery critical in terms of criticality". Further discussions during the F2F concluded that we'd drop batterylow and batterycritical events and add something like a "status" attribute that can take the values "ok", "low", or "critical".
>
> With the new approach, it seems pretty obvious what the relationship between "ok", "low" and "critical" is. I propose to follow the same construction as for the level attribute, leading to the following changes:
>
> - In current section 3, adding a "status" attribute:
> [[
> interface BatteryStatusEvent: Event {
> readonly attribute boolean isPlugged;
> readonly attribute float? level;
> readonly attribute string? status;
> void initBatteryStatusEvent (DOMString type, boolean bubbles, boolean cancelable, boolean isPlugged, float? level);
> };
> ]]
>
> - In current section 3.1, adding the "status" attribute definition ("scaled from critical to ok"):
> [[
> status of type string, readonly, nullable
> One of ok, low, critical or null.
> Represents how much of the internal power source remains, scaled from critical to ok. The definitions of a low battery and of a critically low battery conditions are left to the implementation. If the implementation is unable to report battery's level, then status MUST be set to null.
> No exceptions.
> ]]
>
> - In current section 3.3, adding status change as a condition to dispatch the event:
> [[
> The user agent MUST dispatch this event type on the Window [HTML5] and WorkerGlobalScope [WEBWORKERS] objects when a change in the battery status of the hosting device occurs as follows:
> - isPlugged changes its value, or
> - status changes its value, or
> - level changes by at least 1%
> ]]
>
>
> Francois.
>
>
Received on Thursday, 21 July 2011 15:28:11 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:49 UTC