Add support for body element

Found inconsistencies in how window.onscroll and the scroll event are
handled. Figured it was simpler to use an interval for scroll checking.