title: Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'
body: <pre><code>var line = "&lt;p&gt;&lt;strong&gt;" + name + ": &lt;/strong&gt;" + message.field_message_body.und[0].value + "&lt;/p&gt;";
  console.log(line);
  console.log(document.getElementById("messages"));
  
  document.getElementById("messages").appendChild(line);
  </code></pre>
  
  <blockquote>
    <p>messages exists and it returns </p>
  </blockquote>
  
  <p><code>&lt;div id=messages"&gt;&lt;/div&gt;</code></p>
  
  <p>Nothing appears to be empty, so I'm not sure why this is being thrown.</p>
  
  <p>Does anyone have any idea why it might be throwing this error?</p>