- From: Anssi Kostiainen <anssi.kostiainen@nokia.com>
- Date: Tue, 25 Oct 2011 13:00:08 +0300
- To: ext Jonas Sicking <jonas@sicking.cc>, public-device-status@w3.org
On 24.10.2011, at 10.16, ext Anssi Kostiainen wrote: > On 22.10.2011, at 5.52, ext Jonas Sicking wrote: > >> I'm not fully sold on the chargingState though. What problem are you >> trying to solve compared to simply exposing a boolean indicating if >> the device is plugged in or not? I agree that .charging might not be >> the best name for such a property, but naming seems like an easier >> problem to solve. > > chargingState was something Mounir suggested (or just mentioned, naming aside) as an alternative design to the boolean type. We did not find any decent use cases for states yet, so we could just go with the simpler boolean. Here's a summary I wrote about charging vs. chargingState earlier: > > http://lists.w3.org/Archives/Public/public-device-status/2011Oct/0014.html I replaced 'chargingState' of type DOMString with 'charging' of type boolean: [[ charging of type boolean, readonly Represents if the system's battery is charging. The attribute must be set to true if the battery is charging, and set to false otherwise, or if the implementation is unable to report the state, or there is no battery attached to the system. ]] http://dev.w3.org/2009/dap/system-info/battery-status.html Given the newly added 'chargingTime' (and 'remainingTime') I did not see use cases for 'chargingState' anymore. I think the API looks nicer now. Again, let me know if there are any concerns with this change. -Anssi
Received on Tuesday, 25 October 2011 10:00:42 UTC