W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2009

[whatwg] window.setInterval if visible.

From: Robert O'Callahan <robert@ocallahan.org>
Date: Fri, 30 Oct 2009 01:11:02 +1300
Message-ID: <11e306600910290511l5d2b6253g8b55486136ecf69@mail.gmail.com>
On Fri, Oct 30, 2009 at 12:23 AM, timeless <timeless at gmail.com> wrote:

> On Thu, Oct 15, 2009 at 10:53 PM, Markus Ernst <derernst at gmx.ch> wrote:
> > From a performance point of view it might even be worth thinking about
> the
> > contrary: Allow UAs to stop the execution of scripts on non-visible
> windows
> > or elements by default, and provide a method to explicitly specify if the
> > execution of a script must not be stopped.
>
> fwiw, the N900 browser (microb) does this by default. it breaks google
> talk in gmail among other things. (You can turn this option off
> through the browser menus, you don't need to use about:config.)
>
> in many ways it's bad, especially since once broken, pages can't
> really be fixed, and users don't really understand that we broke it
> because they let us.
>
> being able to send a "Hibernate" and "Resume" event pair to web apps
> could be neat, but we don't have the resources to see if we could
> convince pages to respond to them.
>

Why don't you just treat this like bfcache and fire "pagehide" and
"pageshow" events?

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20091030/cf30721b/attachment.htm>
Received on Thursday, 29 October 2009 05:11:02 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:18 UTC