W3C home > Mailing lists > Public > public-html@w3.org > October 2009

Re: typeof document.all

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 13 Oct 2009 17:48:45 -0700
Message-ID: <63df84f0910131748v6884687dpcd9ce0b0028c133b@mail.gmail.com>
To: Brendan Eich <brendan@mozilla.org>
Cc: Ian Hickson <ian@hixie.ch>, Maciej Stachowiak <mjs@apple.com>, HTML WG <public-html@w3.org>
On Tue, Oct 13, 2009 at 5:38 PM, Brendan Eich <brendan@mozilla.org> wrote:
> On Oct 13, 2009, at 5:30 PM, Ian Hickson wrote:
>
>> On Tue, 13 Oct 2009, Brendan Eich wrote:
>>>
>>> Thinking this through, I have two general approaches for alternative 3
>>> in mind, hope it's ok to throw them out quickly:
>>>
>>> (3a) underspecify document.all as a host object property that may be
>>> reliably tested only by if, &&, ||, == null, == undefined, and ! and the
>>> != counterparts. Anything else is unspecified behavior.
>>
>> Personally I would be against underspecifying anything that can be
>> black-box tested from a Web page.
>
> This is silly. Is everything else in HTML5 full specified in terms of
> effects in the DOM, global objects, information leaks including implicit
> flows, and anything else "that can be black-box tested"?
>
> I doubt it!
>
> BTW, are you amenable to confining document.all to quirks mode?

I agree with Brendan. In general I'm against leaving things undefined.
However, as with any other general principle, there are exceptions. If
it's extremely unlikely that undefined behavior will be depended on,
and if specifying that behavior carries significant costs, then
leaving things undefined can be the way to go. I believe this is one
of those cases.

/ Jonas
Received on Wednesday, 14 October 2009 00:49:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:50 GMT