03 | 29 :: More JavaScript fun
So I am going 100% DOM acceptable scripting, and today I found another inconsistency between IE and Firefox, and to be honest, I am not sure which side i agree with this time.
<div id="picname">
<p>title</p>
</div>
Ok so given this code, if you request the childNodes of the element picname, you get different results based on the browser. IE gives you one child node, specifically the p tag. Firefox gives you three, the carriage return and white space before the p tag, the p tag itself and the carriage return and white space after the p tag. Illustration below:
ie

ff

if you remove all the whitespace and the newline characters then the firefox works the same way that ie works... I am not sure which is the 'correct' way to do it... it is just good to note if you are goind to do any dom scripting.