[whatwg] document.head

Anne van Kesteren annevk at opera.com
Tue Oct 6 07:14:08 PDT 2009


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
http://annevankesteren.nl/



More information about the whatwg mailing list