W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2012

Re: variable declarations shadowing named properties on window

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 06 Jan 2012 13:22:02 -0500
Message-ID: <4F073BCA.4020009@mit.edu>
To: Travis Leithead <travis.leithead@microsoft.com>
CC: Cameron McCormack <cam@mcc.id.au>, Allen Wirfs-Brock <allen@wirfs-brock.com>, Ojan Vafai <ojan@chromium.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>, Ian Hickson <ian@hixie.ch>, Jeff Walden <jwalden@mit.edu>
On 1/6/12 1:16 PM, Travis Leithead wrote:
> Will moving the object that supports named properties to be in the prototype chain
> mess up anything else? Based on WebIDL's [DefineOwnProperty] algorithm for platform
> objects, it already seems like [ReplaceableNamedProperties] and [OverrideBuiltins]
> are mutually exclusive--so there probably won't be a problem there.

I think that's correct...

Note that Gecko already has element ids (but not frame names) on the 
proto chain, not directly on the window.  Of course it also only has 
them in quirks mode....

> It seems like moving the GSP functionality to the prototype should only happen for
> [ReplaceableNamedProperties] and only for named properties (not indexed properties).

Why not indexed properties, for the window case?  What's the benefit of 
keeping indexed properties on the window itself?  There's at least one 
drawback: it complicates implementation a good bit, at least in Gecko.

Received on Friday, 6 January 2012 18:30:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:05 UTC