- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Thu, 09 Aug 2012 22:00:39 -0400
- To: public-webapps@w3.org
On 8/9/12 9:44 PM, Cameron McCormack wrote: > Kyle Huey: >> PS. We're also going to run into this in the future with any other >> prefixed DOM APIs we add to the global, probably even if we don't tell >> people to do it wrong in our tutorials. This behavior is a pretty >> massive footgun. > > The problem seems to be because Web IDL moved properties from IDL > attributes up to the prototype Just a point of record: they were already there in many implementations. > and that changed `var attributeName;` behaviour. No, that changed when the ES spec changed how 'var' works recently... It didn't use to shadow things the way it does now, iirc. > What if we change window's [[DefineOwnProperty]] so that if it would > create a shadowing property for a name that corresponds to an IDL > attribute on Window (or one of its mixed in interfaces), it doesn't do > that? But not for operations. Just for Window? What about interfaces Window inherits from? An why not for operations? Seems like exactly the same issue arises with: var requestAnimationFrame = window.requestAnimationFrame || ....; -Boris
Received on Friday, 10 August 2012 02:01:08 UTC