<!DOCTYPE html>
<html>
  <body>
    <textarea id="t"></textarea>
    <script>
      document.getElementById("t").appendChild(document.createTextNode(""));
      document.getElementById("t").firstChild.data = "abcdefgh";
    </script>
  </body>
</html>