src/util/toFragment.js
function(string) {
  if (!string) {
    var fragment = document.createDocumentFragment();
    fragment.appendChild(document.createTextNode(''));
    return fragment;
  }
  var templateElement;
  templateElement = document.createElement('template');
  templateElement.innerHTML = string;
  return templateElement.content;
}
function(string) {
  if (!string) {
    var fragment = document.createDocumentFragment();
    fragment.appendChild(document.createTextNode(''));
    return fragment;
  }
  var templateElement;
  templateElement = document.createElement('template');
  templateElement.innerHTML = string;
  return templateElement.content;
}
function ( string ) { if ( ! string ) { var fragment = document . createDocumentFragment ( ) ; fragment . appendChild ( document . createTextNode ( '' ) ) ; return fragment ; } var templateElement ; templateElement = document . createElement ( 'template' ) ; templateElement . innerHTML = string ; return templateElement . content ; }
Converts a string of HTML text into a document fragment.
Converts a string of HTML text into a document fragment .