title: Why does appendChild(Text) on IE11 fail?
body: <p>The second <code>appendChild()</code> below fails in IE11 (and possibly others):</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var span = document.getElementById('domNode');
  var existingTextNode = span.childNodes[0];
  span.innerHTML = '';
  
  var newTextNode = document.createTextNode('new Text Node');
  console.log(existingTextNode.nodeName, "=?=", newTextNode.nodeName);
  
  span.appendChild(newTextNode);
  console.log('newTextNode appended OK');
  
  span.appendChild(existingTextNode);
  console.log('existingTextNode appended OK');</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;span id='domNode'&gt;pre-existing Text Node&lt;/span&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The new <code>TextNode</code> gets appended successfully. The existing one fails:</p>
  
  <pre><code>Error: {
    "message": "Invalid argument.",
    "filename": "http://stacksnippets.net/js",
    "lineno": 23,
    "colno": 1
  }
  </code></pre>
  
  <p>What's the underlying reason for the failure here? (Is this defined behavior? A bug?) Is it specific to pre-existing <code>TextNode</code> objects?</p>
  
  <p>... And most importantly, is my only workaround to just always create new <code>TextNode</code>'s when I need to append them? Or, is there some trick I'm missing that will allow me to treat a pre-existing <code>TextNode</code> like any other node?</p>