Skip to content

Instantly share code, notes, and snippets.

@aach
Last active December 18, 2015 04:49
Show Gist options
  • Save aach/5728319 to your computer and use it in GitHub Desktop.
Save aach/5728319 to your computer and use it in GitHub Desktop.
var oStrongWithoutWrapper = ( function ( doc )
{
function createStrongWithWrapper()
{
var oStrong = doc.createElement('strong');
oStrong.innerHTML = 'ola k ase'
return doc.createDocumentFragment()
.appendChild( oStrong );
}
return createStrongWithWrapper();
}( document ));
console.log( oStrongWithoutWrapper.nodeName ); //logs "STRONG" instead of "#document-fragment"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment