Why doesn’t ‘this.childNode’ work?

this.childNode‘ not working?

If you are trying to get a javascript function to work using

this.childNode.foo

and it’s not working, it’s because the syntax is wrong.

Try this.firstChild.foo instead!

Guessing at the correct DOM element name to use doesn’t always work!

Found this on Experts Exchange. Thansk ahosang for the answer.