Use document.body.appendChild() instead.