[whatwg] document.head

Hallvord R M Steen hallvors at gmail.com
Tue Oct 6 07:14:13 PDT 2009

> 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

..though less magic than I remembered - it only skips text nodes, not
comments.. And perhaps what happens is that the text node is put
inside body instead? I'd have to do some more testing to tell what
browsers actually do..

Hallvord R. M. Steen

More information about the whatwg mailing list