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

Re: [PageVisibility] location of the interface

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 02 May 2011 19:23:50 -0400
Message-ID: <4DBF3D06.3010108@mit.edu>
To: public-web-perf@w3.org
On 5/2/11 7:08 PM, Cameron McCormack wrote:
> Jonas Sicking:
>> 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.
>
> It’s fine in Firefox, where declaring and assigning to variables doesn’t
> interfere with properties from the Window object

Only if the variables are declared with |var|.  Plenty of scripts use 
undeclared variables, though.

-Boris
Received on Monday, 2 May 2011 23:24:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:01:08 UTC