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

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

From: Cameron McCormack <cam@mcc.id.au>
Date: Sun, 12 Aug 2012 11:55:09 +1000
Message-ID: <50270CFD.7050902@mcc.id.au>
To: Kyle Huey <me@kylehuey.com>
CC: Brendan Eich <brendan@mozilla.com>, Boris Zbarsky <bzbarsky@mit.edu>, public-script-coord@w3.org, es-discuss@mozilla.org
Kyle Huey:
> Can we leave EventTarget's methods on the proto chain and only move the
> ones on the Window interface itself?  Unlike Window, EventTarget isn't
> changing very much.

We could.  You're right it's not changing much, but I wouldn't want to 
box ourselves in to not being able to extend it later.  But maybe it's 
less likely that people will try to use the

   var newEventTargetFunction = window.newEventTargetFunction ||
                                window.mozNewEventTargetFunction || ...

pattern there.
Received on Sunday, 12 August 2012 01:55:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:06 UTC