"var" declarations shadowing properties from Window.prototype

Boris Zbarsky bzbarsky at MIT.EDU
Sun Aug 12 10:16:13 PDT 2012

On 8/11/12 10:57 PM, Brendan Eich wrote:
> I think WebIDL and interface-based method definition made onload, e.g., predefined on
> window objects, or more recently on Window.prototype. Was this useful?

It's required for web compat, as I said earlier in this thread.  They 
_could_ perhaps be predefined as data properties set to null, but data 
properties which have as a side effect of setting them to a function 
object the registration of an event listener... which starts to look a 
lot like an accessor property to me.


More information about the es-discuss mailing list