W3C home > Mailing lists > Public > public-device-apis@w3.org > April 2012

Re: Battery Status API changes since the last publication

From: Anssi Kostiainen <anssi.kostiainen@nokia.com>
Date: Mon, 16 Apr 2012 15:23:52 +0300
Cc: "public-device-apis public-device-apis@w3.org" <public-device-apis@w3.org>
Message-Id: <F01F3270-29EB-4C46-AD3E-0AA601B2F548@nokia.com>
To: ext Marcos Caceres <w3c@marcosc.com>
Hi Marcos,

Thanks for your comments. And welcome to the group :)

[I should have probably mentioned that the mail summarizing the changes was an informative one and all the changes listed have already been discussed on the mailing list and agreed by the working group. There are also multiple independent implementations.]

On 16.4.2012, at 12.39, ext Marcos Caceres wrote:

> On Monday, 16 April 2012 at 09:03, Anssi Kostiainen wrote:
> 
>> - Added [TreatNonCallableAsNull] keywords to on* handlers.
> 
> Note that [TreatNonCallableAsNull] is still in flux in WebIDL. I strongly recommend emailing the WebIDL list about this for guidance before proceeding (might save a bit of a headache later). Event handlers may end up being defined in DOM4.

We want to avoid blocking on that, if at all possible. [TreatNonCallableAsNull] (or an equivalent) is required by various handlers in the HTML5 spec and others by both legacy and "new" APIs. My suggestion is we follow the lead and adapt when the dust settles, if needed, but go forward with what we have now.

My understanding is that in this case we can adjust the spec after entering the CR without the need to jump through too many hoops. Let's not get the process get on our way.

(I think the general question here is how to deal with an unstable Web IDL as a normative reference.)

>> - Dropped 'full' from the true condition for the charging attribute.
>> - Fixed two substantial typos (s/dischargingchange/dischargingtimechange/g) in the Event handlers section.

[...]

> I'll note that it seems pretty extreme to have four different event registers that basically do the same thing: detecting a change in charge. Why don't you merge them into a "onchange" attribute?

Basically the gist of the design is we don't want to fire unneeded events. Especially on an API that is there to help save same battery.

> Also, the spec says that BatteryManager is an EventHandler, yet no events are fired at it (that seems wrong - event handlers need to have events fired at them)?  


Actually, all the events are fired at the BatteryManager object. 

-Anssi
Received on Monday, 16 April 2012 12:24:57 UTC

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