Re: solving the CPU usage issue for non-visible pages

On Wed, Oct 21, 2009 at 5:16 AM, Robert O'Callahan wrote:
>
> There are lots of reasons why the browser might deduce that the user is not
> paying attention to a document, e.g.
> -- the browser window containing the document is minimized
> -- the tab containing the document is hidden
> -- the document is in an IFRAME and scrolled offscreen
> -- the browser window is buried behind other windows on the desktop
> -- the screen is dimmed for power saving
> -- gaze tracking detects that the user is looking somewhere else
> -- ultrasonic pings detect that the user is not there
>
> If we need an API beyond just animation, you might as well call it something
> like window.hasAttention so browsers can cover all of those cases.

...which looks a lot like some kind of "idleness", as has been already
proposed/discussed at the WHATWG and then here:
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-August/022443.html
(later revised at
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-September/022984.html
and http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-September/022985.html
)
http://lists.w3.org/Archives/Public/public-webapps/2009JulSep/1103.html

We could add a new idleState value that'd be set (with an
idleStateChange event) as soon as the window (browsing context)
becomes "inactive".


-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/

Received on Wednesday, 21 October 2009 08:06:03 UTC