Re: Spec for [Global] does not seem to be quite web-compatible, and none of the UAs are really compatible with each other

On 12/26/13 12:12 AM, Garrett Smith wrote:
> Simple assignment to onload = { foo: "bar"; }; should be a
> SyntaxError.

Whyever would it be a syntaxerror?  Are you saying that's what the spec 
says (it doesn't, afaict) or that's what the spec should say (it 
shouldn't, because I'm 99.9% sure that's not web-compatible).

> If onload exists in the prototype chain, and the VariableEnvironment's
> onload is not given the value `undefined`, then what is going on?

I'm not sure what you're asking.

> How can you avoid craziness when the global object and the global
> VariableEnvironment are the same object, and the global object has a
> prototype chain?

It's all quite specified right now.

> This and the GlobalScopePolluter aren't adequately specified.

They actually are, if you mean behavior being fully defined.  The 
question here is whether the behavior that's defined is the one we want.

> The erratum in https://bugs.ecmascript.org/show_bug.cgi?id=78#c0 must
> be followed so that var statements at the top level of scripts can
> shadow any properties from the global object’s prototype chain.

Sure.  That's a constraint on possible solutions to the issue at hand, 
obviously; all UAs seem to implement this correctly at this point.

-Boris

Received on Thursday, 26 December 2013 15:20:26 UTC