• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Javascript's firstNode Attribute may differ from standard

P

pfoertner

Flightless Bird
The firstChild attribute of DOM node seems to contain different information
than childNodes[0].

According to http://www.w3schools.com/dom/prop_element_firstchild.asp
domNode.firstChild and domNode.childNodes[0] should return the same, but
under some circumstances the firstChild attribute returns null instead (it
seems that it has to do with other tags used on the same page, but I didn't
find out which tags exactly - in one case the error disappeared by removing a
linebreak tag, but on another page the error still remained).

The error occured while using dojo libraries (file dijit/_Templated.js)
browsing the site with Internet Explorer 8. No Script errors occured by using
firefox.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/communitie...&dg=microsoft.public.internetexplorer.general
 
R

rob^_^

Flightless Bird
You can submit an issue ticket at

connect.microsoft.com

regards.

"pfoertner" <pfoertner@discussions.microsoft.com> wrote in message
news:12F1AEEA-954C-465D-BC69-7A3FABD0C3DE@microsoft.com...
> The firstChild attribute of DOM node seems to contain different
> information
> than childNodes[0].
>
> According to http://www.w3schools.com/dom/prop_element_firstchild.asp
> domNode.firstChild and domNode.childNodes[0] should return the same, but
> under some circumstances the firstChild attribute returns null instead (it
> seems that it has to do with other tags used on the same page, but I
> didn't
> find out which tags exactly - in one case the error disappeared by
> removing a
> linebreak tag, but on another page the error still remained).
>
> The error occured while using dojo libraries (file dijit/_Templated.js)
> browsing the site with Internet Explorer 8. No Script errors occured by
> using
> firefox.
>
> ----------------
> This post is a suggestion for Microsoft, and Microsoft responds to the
> suggestions with the most votes. To vote for this suggestion, click the "I
> Agree" button in the message pane. If you do not see the button, follow
> this
> link to open the suggestion in the Microsoft Web-based Newsreader and then
> click "I Agree" in the message pane.
>
> http://www.microsoft.com/communitie...&dg=microsoft.public.internetexplorer.general
 
Top