W3C home > Mailing lists > Public > public-html@w3.org > July 2008

Re: document.body (detailed review of the DOM)

From: Simon Pieters <simonp@opera.com>
Date: Mon, 28 Jul 2008 09:59:46 +0200
To: "Ian Hickson" <ian@hixie.ch>
Cc: public-html <public-html@w3.org>
Message-ID: <op.uezshwuwidj3kv@zcorpandell.linkoping.osa>

On Sat, 26 Jul 2008 00:46:20 +0200, Ian Hickson <ian@hixie.ch> wrote:

> On Fri, 13 Jul 2007, Simon Pieters wrote:
>> On Fri, 13 Jul 2007 13:59:11 +0200, Simon Pieters <simonp@opera.com>  
>> wrote:
>>
>> > I think the spec should be aligned with what IE and Opera do on  
>> getting,
>> > i.e. return the first body or frameset element in the document. I  
>> think the
>> > spec is fine for setting.
>>
>> ...except the wording needs to be changed a bit. Step 3 says:
>>
>>    Otherwise, if the body element is not null, then replace that element
>>    with the new value in the DOM, as if the root element's  
>> replaceChild()
>>    method had been called with the new value and the incumbent body  
>> element
>>    as its two arguments respectively, then abort these steps.
>>
>> s/root element/body element's parent node/
>
> How can the body element's parent node ever be anything but the root
> element, given the definitions in the spec?

I suggested that the definitions be changed...:

>> > I think the spec should be aligned with what IE and Opera do on  
>> getting,
>> > i.e. return the first body or frameset element in the document.

But now I think it's better to have document.body be more in line with the  
CSS definition of the body element (so code can be reused), so the spec is  
fine.

-- 
Simon Pieters
Opera Software
Received on Monday, 28 July 2008 08:00:30 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:56 UTC