W3C home > Mailing lists > Public > public-web-perf@w3.org > December 2012

[PageVisibility] Add hidden and visibilityState to visibilitychange event

From: Scott Andrews <andrewss@rbcon.com>
Date: Wed, 19 Dec 2012 12:34:48 -0500
Message-Id: <69EC70DC-082D-4E64-A672-A65BD8FB50AB@rbcon.com>
To: public-web-perf@w3.org
The 'visibilitychange' event[0] is currently defined as a simple event, containing no unique attributes.  Is there a reason why the event does not include the 'hidden' and 'visibilityState' attributes?

The particular use case I'm trying to satisfy involves capturing an audit log (click stream) of events that can be analyzed offline.  The visibilitychange event as currently defined doesn't provide any detail about the new state, just that the state changed.  While I could copy these properties from the document into the event, including them as part of the spec is reasonable.  As precedent, the 'hashchange' event[1] includes the URL as an attribute, while a developer could lookup the location manually.

Apologies if this has been previously discussed, a search of the list archives didn't turn up any hits.

-Scott

[0] http://www.w3.org/TR/2012/CR-page-visibility-20120726/#sec-visibilitychange-event
[1] http://www.w3.org/TR/2012/WD-html5-20121025/history.html#event-hashchange
Received on Thursday, 20 December 2012 10:53:20 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:33 UTC