Re: DOMObject.firstChild inconsistencies

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 UTC