W3C home > Mailing lists > Public > public-html@w3.org > January to March 2007

Re: DOMObject.firstChild inconsistencies

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Wed, 21 Mar 2007 04:19:36 +0100
Message-ID: <4600A448.6040305@disruptive-innovations.com>
To: public-html@w3.org

On 21/03/2007 03:24, Dailey, David P. wrote:

> Or, for one simple example, consider the following simple code in which FF and IE return (via alert) "HEAD", but Opera returns "SCRIPT". 
> 
> <html>
>       <script>
>       alert(document.documentElement.firstChild.nodeName)
>       </script>
>       <body>Hello</body>
> </html>

This is not an inconsistency at all. This is a bug in Opera... HTML
model states that there is an implicit head element. And it's
probably not a bug in the DOM implementation of firstChild but a bug
in their HTML parser not building the implicit structures missing in
the document instance.

</Daniel>
Received on Wednesday, 21 March 2007 03:19:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 21 March 2007 03:19:40 GMT