[whatwg] window.setInterval if visible.

Robert O'Callahan robert at ocallahan.org
Thu Oct 29 05:11:02 PDT 2009


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-0002.htm>


More information about the whatwg mailing list