- From: Simon Pieters <zcorpan@hotmail.com>
- Date: Mon, 05 Sep 2005 19:28:20 +0000
Hi, >IE7 Beta 1: ><HTML><HEAD><TITLE>...</TITLE><SECTION></HEAD> ><BODY>...</SECTION> ><DIV>...</DIV></BODY></HTML> > >(That's very wierd, IE just loves producing broken DOMs! :-/ I assume IE6 >will produce a similar result, though I don't have it available to test) I think that IE treats <section> as one empty element, and </section> as another empty element, so the DOM tree looks like: HTML - HEAD - - TITLE - - SECTION - BODY - - #text - - /SECTION - - DIV - - - #text Based on the results of: javascript:alert(document.getElementsByTagName("SECTION")[0].nodeValue); javascript:alert(document.getElementsByTagName("/SECTION")[0].nodeType); (nodeType is interesting, because IE will grab nodes that are not ELEMENT_NODEs with getElementsByTagName, such as the doctype declaration which according to IE has a tagName of "!" and nodeType of 8...) Regards, Simon Pieters
Received on Monday, 5 September 2005 12:28:20 UTC