W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2003

Re: The type document.body should be HTMLBodyElement, no ?

From: Philippe Le Hegaret <plh@w3.org>
Date: 27 Feb 2003 16:31:22 -0500
To: Teng-Fong Seak <seak_tengfong@yahoo.com>
Cc: WWW DOM <www-dom@w3.org>
Message-Id: <1046381482.8012.244.camel@jfouffa.w3.org>

On Tue, 2003-02-25 at 14:46, Teng-Fong Seak wrote:
>     In the following two URLs, we can find the same definition line :
> attribute   HTMLElement   body;
> 
>     But I think it's more appropriate to have :
> attribute   HTMLBodyElement  body;
> 
> DOM 1 HTML:
> http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-26809268
> DOM 2 HTML:
> http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268
> 
>     It's just a small documentation issue, I think, because major
> browsers are using HTMLBodyElement instead of HTMLElement anyway.  Or
> is this written intentionally like this so that browsers are advised to
> stop supporting attributes of document.body like aLink, bgColor, etc
> since they're deprecated ?  But the second paragraph of this URL seems
> to oppose what I thought :
> http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268

I believe that the description indicates why it is not always an
HTMLBodyElement object:
[[
The element that contains the content for the document. In documents
with BODY contents, returns the BODY element. In frameset documents,
this returns the outermost FRAMESET element.
]]
http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-56360201

The body attribute may also contain an HTMLFrameSetElement object.

Philippe
Received on Thursday, 27 February 2003 16:31:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:56 GMT