hello there,
Just a quick question on chapter 12 example 2:
I get the idea of navigating the DOM tree structure,
but can please elaborate on the conditional statement such as:
Code:
if (headElement.nextSibling.nodeType == 3)
{
bodyElement = headElement.nextSibling.nextSibling;
}
What I think I know:
The statement above is for browsers that consider a "whitespace" a node.
That's why there are "nextSibling.nextSibling" for the purpose of skipping whitespace?
If so,
The integer value 3 (according to Appendix C) is TEXT_NODE, and white space is considered a TEXT_NODE?
Thanks,
tdatu