check for appendChild, if not use append
Merge remote-tracking branch 'origin/root-elements'