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

On Sep 2, 2011, at 12:55 , Anssi Kostiainen wrote:
> There's one issue I can think of in dropping start() (and keeping stop()): if you stop() you'll need to construct a new BatteryStatusEventSource to continue firing. If we drop stop() too that would be more obvious, but there would be the GC issue mentioned above.

I think that the use cases for starting/stopping are few and that the cost of reconstructing a new BSES is pretty low, certainly not that much higher than calling start() on an existing one that's been kept around. I wouldn't worry too much about that as part of the design.

-- 
Robin Berjon - http://berjon.com/ - @robinberjon

Received on Tuesday, 6 September 2011 11:09:56 UTC