function setTextContent(node, value) {
  if (isCommentNode(node)) {
    node.data = value;
  } else if (isTextNode(node)) {
    node.value = value;
  } else {
    var tn = newTextNode(value);
    tn.parentNode = node;
    node.childNodes = [tn];
  }
}
function setTextContent(node, value) {
  if (isCommentNode(node)) {
    node.data = value;
  } else if (isTextNode(node)) {
    node.value = value;
  } else {
    var tn = newTextNode(value);
    tn.parentNode = node;
    node.childNodes = [tn];
  }
}
function setTextContent ( node , value ) { if ( isCommentNode ( node ) ) { node . data = value ; } else if ( isTextNode ( node ) ) { node . value = value ; } else { var tn = newTextNode ( value ) ; tn . parentNode = node ; node . childNodes = [ tn ] ; } }
Set the text value of a node or element

Equivalent to `node.textContent = value` in the browser
Set the text value of a node or element