Create a temporary container and append all body content to that container
What I am attempting to do with JavaScript (no libraries) is to create a
fragment append all the content of the body into that fragment:
var _fragment = document.createDocumentFragment(),
_children = document.body.childNodes;
for( var i=0,_clen=_children.length; i<_clen; i++ ) {
_fragment.appendChild( _children[i] );
}
This does not seem to be working for some reason.
Best, Speedy
No comments:
Post a Comment