So let's say I have a very basic page with a body, a single div, and a paragraph element inside with some text.
<body>
<div>
<p>some text</p>
<div>
</body>
Depending on the browser, the body / div elements will have text nodes (nodeType === 3, nodeValue === "--blank--"). However the P element will have a legitimate text node with nodeValue === "some text".
What I am wondering is what is that "nodeValue" (--blank--) of a 'fake' text-node that represents whitespace equal to, as I want to write an if test that will let me filter out the fake text nodes.
Example:
var body = document.getElementsByTagName("body")[0]; // shortcut to body element.
console.log(body.childNodes[0].nodeValue) // maps to one of the fake text nodes that are blank.
// returns a blank line. What is that "blank" equal to? It's not 'null' or "" or undefined...
Cheers, Alex