I\'m trying to detect the position of the browser\'s scrollbar with JavaScript to decide where in the page the current view is. My guess is that I have to detect where the t
if you care for the whole page. you can use this:
document.body.getBoundingClientRect().top