"var" declarations shadowing properties from Window.prototype

Brendan Eich brendan at mozilla.com
Sat Aug 11 18:16:20 PDT 2012

As bz and others point out, the object detection w/ var pattern can 
arise for operations, e.g. for requestAnimationFrame, using the same

   var requestAnimationFrame = window.mozRequestAnimationFrame || ... || 

pattern. So WebIDL operations (JS methods) on the global would be 
promoted to "own" too. They'd be configurable, if I recall correctly, 
and either writable or replaceable. Do I have that right?


Cameron McCormack wrote:
> Are we talking just about attributes here, and not operations?  So 
> Window.prototype.open would still exist and there'd be no own "open" 
> property on window?
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

More information about the es-discuss mailing list