We would like to know how to loop through DocumentFragment's children.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>
var o = document.createDocumentFragment();
o.appendChild(document.createElement('div'));
var childNodes = o.childNodes;
for (var i = 0, len = childNodes.length; i < len; i++) {
console.log(childNodes[i].tagName);
}<!--from www . j av a 2 s . com-->
</script>
</head>
<body>
</body>
</html>
The code above is rendered as follows: