Works for me when I set the .html as application/xhtml+xml on the web server. I think the mimetype overriding the doctype is correct behaviour.
Oh, that's a possibility. I always assumed that the DOCTYPE was the be all end all of the document type. Hmmm. Ahhh, if that's the case, I guess I have to set my own content-type. Because this is what it is setting... Content-Type: text/html Sorry about that. (In reply to comment #1) > Works for me when I set the .html as application/xhtml+xml on the web server. > I think the mimetype overriding the doctype is correct behaviour. >
Marking as invalid per comment 2, assuming someone understands why the insertBefore call fails when the document is sent as text/html. (My guess is that when the document is sent as text/html, the parser adds a TBODY element between the TABLE and TR elements, making it so the TR isn't a direct child of the TABLE.)
Very good guess. Yes, it was adding a tbody, and it is now working, since I put in the correct content-type header.