[whatwg] window.setInterval if visible.

timeless timeless at gmail.com
Thu Oct 29 04:23:57 PDT 2009


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.

> If you provide methods to check the visibility of a window or element, you
> leave it up to the author to use them or not. I think performance issues
> should rather be up to the UA.

We're trying, but, well, it's too early to see what people will say
about our efforts. (fwiw, I work on the team which did this, but I'm
entirely opposed to it, because explaining it to authors and users is
impossible/impractical).


More information about the whatwg mailing list