Re: [battery] addEventListener side effects, ordering & boundary crossing of battery{low, critical}, window.on*

On Wed, 31 Aug 2011 15:20:55 +0200, Anssi Kostiainen  
<anssi.kostiainen@nokia.com> wrote:
> On 31.8.2011, at 14.31, ext Anne van Kesteren wrote:
>> Modifying how addEventListener() works violates DOM Core. Not really  
>> acceptable.
>
> Do you have an alternative design in mind that would address the above  
> use case in a DOM Core conformant manner?

http://lists.w3.org/Archives/Public/public-geolocation/2011Jul/0023.html  
has an alternative.


>> I think initBatteryStatusEvent() should be dropped. New specifications  
>> should use the DOM Core event constructor mechanism and not further  
>> proliferate init*Event() methods.
>
> The new constructor is really great, but I think supporting both the old  
> and the new model simultaneously would be a relatively small investment  
> considering you'd get better compatibility with legacy content, e.g. in  
> JavaScript convenience libraries. Or WDYT?

There is legacy content for initBatteryStatusEvent()? Given that this  
specification thus far does not have wide adoption in browsers I think it  
can still be safely dropped. You can use  
http://www.w3.org/TR/progress-events/ as an example.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 31 August 2011 15:29:08 UTC