Quando usamos o ouvinte de rolagem em javascript

var myElement=document.getElementById("someElementID");
myElement.addEventListener("scroll", function(ev){
	ev.target.scrollTop;//pixels scrolled from element top
	ev.target.scrollHeight;//pixels of the whole element.
})
aryen