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

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