title: document createTextNode confusion
body: <p>Here i have an example where the first child of an unordered list is replaced using element.replaceChild() method.To replace the previous node a textNode is created using documen.createTextNode().But the problem is as its called replaceChild method then it should replace the child.And i am replacing it with a textNode.But surprisingly the replaced child has a bullet tag infront it.As textNode is not a list item then why the bullet tag is not removed.Though the question is not a serious one.Posted it only to meet my curiosity.thanks!!</p>
  
  <p><a href="http://jsfiddle.net/t17f2nuo/" rel="nofollow">jsFIDDLE</a></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;ul id="myList"&gt;&lt;li&gt;Coffee&lt;/li&gt;&lt;li&gt;Tea&lt;/li&gt;&lt;li&gt;Milk&lt;/li&gt;&lt;/ul&gt;
  
  &lt;p id="demo"&gt;Click the button to replace the first item in the the list&lt;/p&gt;
  
  &lt;button onclick="myFunction()"&gt;Try it&lt;/button&gt;
  
  &lt;script&gt;
  function myFunction()
  {
  var textnode=document.createTextNode("Water");
  var item=document.getElementById("myList").childNodes[0];
  item.replaceChild(textnode,item.childNodes[0]);
  }
  &lt;/script&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>