createSafeFragment.js
351 Bytes
define( [
"./var/nodeNames"
], function( nodeNames ) {
function createSafeFragment( document ) {
var list = nodeNames.split( "|" ),
safeFrag = document.createDocumentFragment();
if ( safeFrag.createElement ) {
while ( list.length ) {
safeFrag.createElement(
list.pop()
);
}
}
return safeFrag;
}
return createSafeFragment;
} );