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

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?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 25 July 2008 22:46:56 UTC