How can I loop through DocumentFragment childNodes? I’ve tried doing the following:
console.log(result.childNodes);
console.log(result.childNodes.length);
But length seems to be 0 even if I can see the actual child nodes in firebug, like:
[div#tiptip_arrow]
0
Update:
http://jsfiddle.net/ve5hf/
This is not exactly what I’m doing, but demonstrates the problem: when I have a look in Firebug console, I see that the fragment has child nodes, but console.log(result.childNodes); yields [] for some reason. Why is that?
.lengthdoes work.We need more specifics. How do you create the document fragment? What browser?