W3C home > Mailing lists > Public > public-web-perf@w3.org > May 2011

Re: [PageVisibility] location of the interface

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 2 May 2011 01:30:28 -0700
Message-ID: <BANLkTikz22sz_oECH6LUPMLyNz4_rU_J+Q@mail.gmail.com>
To: public-web-perf@w3.org
On Sun, May 1, 2011 at 9:21 PM, Cameron McCormack <cam@mcc.id.au> wrote:
> The NavigatorVisibility interface is defined to be implemented by the
> Navigator object. †I donít think this is the best place, since the
> Navigator object has traditionally been a location for browser-wide
> information and functionality to be exposed. †For example, see the kinds
> of things HTML5 defines on window.navigator:
>
> †http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#system-state-and-capabilities:-the-navigator-object
>
> I think this would be better either on the Window object or on the
> Document object.

I partially agree with you. However it's always iffy to place things
on the window object as that is the global namespace for scripts, and
so you have to worry about colliding with global variables.

The downside with Document is that it exists even on documents that
aren't displayed, such as ones created using XHR or DOMParser.

/ Jonas
Received on Monday, 2 May 2011 08:31:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 2 May 2011 08:31:26 GMT