document.body may be null if script is in head