On 12/22/13 2:40 AM, Garrett Smith wrote: > So if the window.performance API was not `undefined` in, say a browser > that supports none of the prior, then the VariableStatement `var > performance` would then cause it to be, is that it? And that the > initialiser would then potentially get to the bottom of that list and > find window.performance, which now points to that var, and not another > object. If the "performance" property is somewhere up the proto chain that's what would happen, yes. >> var onload; >> (function() { >> onload = { foo: "bar"; }; >> doSomething(onload); >> })(); >> >> Some instances of this pattern have a "var onload" inside the function, >> but some do not, and it's the latter that are problematic. >> > Because `onload` now holds the value `undefined`? No, because the assignment above, if it actually sets the IDL "onload" property, sets it to null. > Of those that do not, what do they do? They end up setting window.onload to null and then passing null to doSomething. > Is there any other way to make Identifier Resolution search first for > variables added to the VariableEnvironment. I'm not trying to make any changes to how ES identifier resolution works here. I think we want to limit the extent of the craziness we have to deal with, and hacking identifier resolution for this case is more than I'm interested in doing. ;) -BorisReceived on Sunday, 22 December 2013 08:03:57 UTC
This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:19 UTC