Re: Standby API Specification Proposal

Hi Marcos,

> 
> This could also happen with the GC-based model, as the object needs to be kept alive and explicitly deleted to be useful.  
> 
> this.wakeLock =  screen.getWakeLock(); 
> 
> function youCanSleepAgain(){
>   doSomething(); // exception thrown
>   delete this.wakeLock; 
> }

That’s true, but choosing between two possible errors - "app should not dim but it does", and “app should dim but it doesn’t” - the second one seems more harmful to me.

> 
> Anyway, the point is that there are lots of ways to manage this - and the underlying OS may give the user means to override allowing apps stopping the screen from going to sleep or dimming. 

I didn’t mean modal dialog, but of course browser or OS should have a chance to notify user of such web app behavior and allow him to reject this. And it’s better to notify him before the action starts, than interrupting process when OS would try to dim the screen for the first time.

Ilya

Received on Thursday, 29 May 2014 17:09:19 UTC