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

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

From: Brendan Eich <brendan@mozilla.com>
Date: Sat, 11 Aug 2012 18:16:20 -0700
Message-ID: <502703E4.4080608@mozilla.com>
To: Cameron McCormack <cam@mcc.id.au>
CC: Boris Zbarsky <bzbarsky@mit.edu>, public-script-coord@w3.org, es-discuss@mozilla.org
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 || ... || 
window.requestAnimationFrame;

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?

/be

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@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
Received on Sunday, 12 August 2012 01:17:02 UTC

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