normalize function
set document as caller of DOMContenetLoaded
change hasChildNodes() to firstChild