W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: Proposal for a page visibility API

From: Glenn Maynard <glenn@zewt.org>
Date: Thu, 20 Jan 2011 19:21:33 -0500
Message-ID: <AANLkTikTdi4Tc5iz2MMaiT51Za6jE+O69_KWx=ve5+ZE@mail.gmail.com>
To: Marcos Caceres <marcosc@opera.com>
Cc: Alex Komoroske <komoroske@chromium.org>, Charles McCathieNevile <chaals@opera.com>, public-webapps@w3.org
On Thu, Jan 20, 2011 at 6:46 PM, Marcos Caceres <marcosc@opera.com> wrote:
> I wonder if view mode media features [1] + CSSOM View's matchMedia() method
> [2] would help meet the requirements? Could looks something like:
>
> var mql = matchMedia("(view-mode:hidden)")
> mql.addListener(handleHide)
>
> We would, of course, need to add "hidden" to [1]... but it would not be a
> big deal.

This might clash, since the modes aren't mutually exclusive.  For
example, a window can be hidden regardless of whether it's fullscreen,
windowed, etc., and a window whose contents are hidden may still be
draggable (if just the title bar is visible).  That may conflict with
[1] "such as the ability for a widget to be dragged or re-sized",
since the draggability of the window is still determined by its real
status (fullscreen, maximized, windowed) and not by whether it's
temporarily obscured.

Working the "prerender", "cache" and "preview" states into view-mode
might also be tricky[2], as well as the functionality exposed by the
boolean (allowing testing for visibility without having to know every
visible state in advance).


[1] http://www.w3.org/TR/2009/WD-widgets-reqs-20090430/#display-modes
[2] I don't think any of the use cases actually cover the more
"advanced" states.  If they're not really needed the whole thing could
be simplified, making it work like window focus--a simple boolean
state.  I don't have a strong opinion on this either way, unless
simplification is needed for it to gain traction.

-- 
Glenn Maynard
Received on Friday, 21 January 2011 00:22:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:16 UTC