W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2013

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 26 Dec 2013 10:20:00 -0500
Message-ID: <52BC4920.2090706@mit.edu>
To: Garrett Smith <dhtmlkitchen@gmail.com>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:19 UTC