Use local body reference instead of document.body.