W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2009

[whatwg] document.head

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 06 Oct 2009 16:14:08 +0200
Message-ID: <op.u1dttuq664w2qv@annevk-t60>
On Tue, 06 Oct 2009 16:02:58 +0200, Hallvord R M Steen  
<hallvors at gmail.com> wrote:
> You might think so. However, as Michael stated above Opera used to do
> this, and it broke a number of websites that expected
> documentElement.firstChild to be <HEAD> no matter what the actual
> markup looked like. So we had to implement a somewhat magic firstChild
> on documentElement and I expect other browsers had to too (as your
> testing seems to confirm, more or less). Which reminds me, this
> peculiarity should possibly be documented in HTML5 :-) .

This is only about what happens during parsing right? I.e. if you create a  
DOM with a text node there firstChild would get it as expected. I think  
that is already covered.

Anne van Kesteren
Received on Tuesday, 6 October 2009 07:14:08 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:17 UTC