- From: Jeff Schiller <codedread@gmail.com>
- Date: Wed, 5 May 2010 12:57:31 -0500
- To: Patrick Dengler <patd@microsoft.com>
- Cc: www-svg <www-svg@w3.org>
Hi Patrick, I'm not sure the right person to contact about this. If there's a better channel in the future, please let me know. I was just breezing over the new HTML5 tests that were introduced with Preview 2 on the IE Testing Center. I have not gone over every test, just looked at two: SVG_HTML_Elements_009 and SVG_HTML_Elements_010 The crux of the problem is that childNodes should refer to not just elements but text nodes. For instance, if I modify SVG_HTML_Elements_009 from: <rect id="rect1" > <circle> </circle> </rect> to: <rect id="rect1" ><circle> </circle> </rect> and I enable Firefox's HTML5 flag, then the test passes. Similarly with SVG_HTML_Elements_010. So it seems like as the tests are written they are incorrect since childNodes[0] should refer to the whitespace text node child that is before the <circle> element, not the <circle> element itself. I think this probably highlights a more serious problem in IE9 (childNodes implementation is not correct), unless I'm completely misunderstanding something. For code like this where I really want the elements and not the other type of DOM nodes, I usually use firstElementChild (from the Element Traversal spec). Regards, Jeff
Received on Wednesday, 5 May 2010 17:58:12 UTC