Re: no longer possible to detect battery presence? RE: Battery API in Last Call

On 12/02/2011 07:57 PM, Tran, Dzung D wrote:
> A suggestion is to reword the following: The spec could be reworded to the following:
>
> Currently it is:
> readonly attribute boolean charging
> Represents if the system's battery is charging. The attribute MUST be set to false if the battery is discharging, and set to true, if the battery is charging, full, the implementation is unable to report the state, or there is no battery attached to the system, or otherwise.
>
> to something:
> Represents if the system's battery is charging. The attribute MUST be set to false if the battery is discharging, and set to true if the battery is charging. If the battery status cannot be determined, the implementation should raise an error or an undefined state.

I don't think this is the way we want to go: exceptions shouldn't be 
thrown for a common state and using a { "yes", "no", "na" } enum would 
be a bad idea for already given reasons.

In addition, I don't see why that would be useful.

--
Mounir

Received on Friday, 2 December 2011 23:00:27 UTC