src/basis/dom.js
function handleInsert(node, newNode, refChild){
    return newNode != null
      ? node.insertBefore(isNode(newNode) ? newNode : createText(newNode), refChild || null)
      : null;
  }
function handleInsert(node, newNode, refChild){
    return newNode != null
      ? node.insertBefore(isNode(newNode) ? newNode : createText(newNode), refChild || null)
      : null;
  }
function handleInsert ( node , newNode , refChild ) { return newNode != null ? node . insertBefore ( isNode ( newNode ) ? newNode : createText ( newNode ) , refChild || null ) : null ; }
Insert newNode into node. If newNode is instance of Node, it insert without change; otherwise it converts to TextNode.
@param {Node} node Target node
@param {Node|*} newNode Inserting node or object.
@param {Node=} refChild Child of node.
@return {Node}
Insert newNode into node . If newNode is instance of Node it insert without change ; otherwise it converts to TextNode .