title: When working with text nodes should I use the "data", "nodeValue", "textContent" or "wholeText" field?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7690627/how-to-retrieve-the-text-of-a-dom-text-node">How to retrieve the text of a DOM Text node?</a>  </p>
  </blockquote>
  
  
  
  <p>In my experiments to handle DOM mutation observers I've noticed that when the <code>target</code> is a text node there are four fields all containing the new text of the node.</p>
  
  <ul>
  <li><code>data</code></li>
  <li><code>nodeValue</code></li>
  <li><code>textContent</code></li>
  <li><code>wholeText</code></li>
  </ul>
  
  <p>Is there a "best practice" for which of these fields I should use?</p>
  
  <p>Are some just for compatibility with other browsers or older DOM standards? Does it make a difference whether I'm reading vs modifying the text? If one is best what is the purpose of the others?</p>