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

Re: "var" declarations shadowing properties from Window.prototype

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 12 Aug 2012 13:04:53 -0400
Message-ID: <5027E235.5050606@mit.edu>
To: Allen Wirfs-Brock <allen@wirfs-brock.com>
CC: Brendan Eich <brendan@mozilla.org>, public-script-coord@w3.org, es-discuss@mozilla.org
On 8/11/12 9:48 PM, Allen Wirfs-Brock wrote:
> I see, this makes perfect sense when onload is viewed simply as a passive property.

That stops being an option once addEventListener also appears, for what 
it's worth.

> It is turning into an active side-effecting registration mechanism that conceptually clashed with function declarations.  I wonder why that was necessary.

Because event listener ordering matters, so you have to register the 
event listener when onload property is set.  Now the question is what 
that listener does: it could just take the thing it's given, or it could 
dynamically look up "onload" on the global.  At some point Gecko used to 
do the latter; it would be interesting to check why we stopped.  It's 
all in the revision history!

Received on Sunday, 12 August 2012 17:05:23 UTC

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