Re: Battery Status API changes since the last publication

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