Re: Proposal for a page visibility API

On Fri, Jan 21, 2011 at 10:24 AM, Drew Wilson <atwilson@google.com> wrote:

> I wanted to point out that many of these use cases are covered adequately
> by document.focus()/document.blur(), which is what we currently use in Gmail
> to decide whether to mark the user as away, decide whether to display
> notifications, etc. In fact, I think the only two use cases that aren't
> already covered by the focus/blur notifications are:
>
> * Page wants to detect prerendering
> * Web app wants to stop updating when it's not visible.
>

The latter set of use-cases are covered by the requestAnimationFrame API (in
various versions, previously discussed on this list), which has particular
advantages for those use-cases.

So this proposal seems mainly useful for prerendering.

Rob
-- 
"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]

Received on Monday, 24 January 2011 04:58:10 UTC