I'm not sure what you're trying to do... here's a JSBin with what you posted and it is creating output, I just don't have any idea what you're grabbing and what result is expected. Maybe some more code would help. Even elaborating on that jsbin would be great^^
// if IE, Chrome take the internal method otherwise build one
return node.outerHTML || (
var div = document.createElement('div'), h;
div.appendChild( n.cloneNode(true) );
h = div.innerHTML;
div = null;
so in your case, you can do:
var acorn = document.getElementById("boxa");
var outputResults = acorn.childNodes;
for (var i=0; i<outputResults.length;i++)
It all depends on what your actual code looks like (including the HTML).
So, it very well could be "right," but without seeing the whole thing or at least the relevant implementation, so we can follow the code directly and see what you are doing.