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

Re: Notes from Monday's meeting with TC39 folks

From: Maciej Stachowiak <mjs@apple.com>
Date: Thu, 08 Oct 2009 11:39:02 -0700
Cc: Anne van Kesteren <annevk@opera.com>, Cameron McCormack <cam@mcc.id.au>, public-script-coord@w3.org
Message-id: <48890904-AEF7-42D4-8851-97CE8A4CB843@apple.com>
To: Brendan Eich <brendan@mozilla.org>

On Oct 8, 2009, at 11:26 AM, Brendan Eich wrote:

> On Oct 8, 2009, at 10:43 AM, Maciej Stachowiak wrote:
>> At first glance, I'm not keen on the idea of making DOM API  
>> behavior depend on ES5 strict mode. Strict and non-strict code can  
>> mix freely, so to do the mode switching you have to know what kind  
>> of code is calling you - that seems yucky to implement and goes  
>> beyond the intent of strict mode that nearly all of its effects can  
>> happen at compile time.
> For our "detecting context" that makes document.all not appear to be  
> present when tested by if, ?:, &&, etc., as opposed to your always- 
> present but falsy object, compile-time is the right time. Just  
> noting this difference.

When testing in Firefox 3.5, I also noticed that document.all returns  
undefined in a variable assignment or an object initializer, e.g.

var x = document.all;
var y = {all: document.all};

You get one all collection and two undefineds.

>> Also, affecting DOM APIs seems like major scope creep for strict  
>> mode. Right now, WebKit's DOM APIs have no idea what kind of code  
>> is calling them and I don't relish adding that functionality.
> Ok, good feedback. Thanks.
>> By contrast, document-level quirks mode vs. standards mode is a  
>> single global switch for the whole document. So it's much easier to  
>> implement the switching and verify that its correct. If we need to  
>> have switchable DOM API behavior, I'd rather base it on HTML  
>> standards vs. quirks rather than ES strict vs. non-strict.
> Are you open to making undetected-document.all emulation depend on  
> an HTML standards vs. quirks mode switch?

I think that would be a reasonable option, if that's enough to get the  
bulk of the compatibility benefit and if other implementors are on  

> Probably we should move now to public-html, if there is no WebIDL  
> angle to any of this.

Sounds good to me.

Received on Thursday, 8 October 2009 18:39:38 UTC

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