Re: Feedback about Battery Status Events

On 24.10.2011, at 18.30, ext Jonas Sicking wrote:

> On Mon, Oct 24, 2011 at 1:41 AM, Mounir Lamouri <mounir@lamouri.fr> wrote:
>> 
>> I think 'remaining' should be used to show the remaining time before the
>> battery is full when the battery is charging. This is an information UI are
>> going to need.
> 
> I'd rather use a separate property for that. That way it's easier to
> write code which for example disables animations when there's less
> than 10 minutes of battery time left.

I renamed 'remaining' to 'remainingTime' and introduced a separate 'chargingTime' as per Jonas' suggestion:

[[

remainingTime of type double, readonly

Represents the time remaining in seconds until the system's battery is depleted and the system is about to be suspended. The attributemust be set to the value positive Infinity, if the implementation is unable to report the time remaining, or there is no battery attached to the system.

[...]

chargingTime of type double, readonly

Represents the time remaining in seconds until the system's battery is fully charged. The attribute must be set to 0, if the battery is full or not charging, or if the implementation is unable to report the remaining charging time, or there is no battery attached to the system.

]]

  http://dev.w3.org/2009/dap/system-info/battery-status.html

Let me know if there are any concerns with this change.

-Anssi

Received on Tuesday, 25 October 2011 10:00:00 UTC