naver / egjs

Javascript components group that brings easiest and fastest way to build a web application in your way.
https://naver.github.io/egjs
Other
935 stars 80 forks source link

filtered scroll event #429

Closed mixed closed 3 years ago

mixed commented 7 years ago

Description

When develop some interface using scroll event. scroll event be weird. sometime, too many called, never called.... So. We can`t use native scroll. If we support normal scroll event then developer will be happy. :)

Idea

document.querySelector("#test").addEventListener("scrollstart", function(){
});
document.querySelector("#test").addEventListener("scrollmove", function(){
});
document.querySelector("#test").addEventListener("scrollend", function(){
});
sculove commented 7 years ago

Each brower has a different scroll event. some browers are called once. some browers are called multiple times. perhaps the scrollmove event is not easy to implement.

mixed commented 7 years ago

My rough idea is when scroll start check scroll position using requestanimationframe. I think that It have to research more detail idea.