Strange behavior in Firefox when nextSibling is a comment
I am pushing nextSiblings into an array inside a while loop. I know Firefoxe is different from IE in the way it picks up nextSibling (it treats whitespace and carriage returns as nodes). But when it picked up regular html comments it goes开发者_开发问答 into an infinite loop, like there are infinite nextSibling nodes that are comments. The solution was simple after I figured out what was happening (just check for nodetype and not push it into array if it's a comment) but I'm really curious if anyone else experienced this and why this is happening? Thanks you.
精彩评论