firstElementChild might not be available in IE<9 (only firstChild)
on IE<9 firstChild is the firstElementChild because MS DOM (IE<9) is not storing empty text nodes. But if you do so on other browsers they will return empty text nodes...
my solution
child=(elem.firstElementChild||elem.firstChild)
this will give the firstchild even on IE<9