I am trying to understand why scroll event listener of querySelector element doesn't work here
document.querySelector('.test-scroll')
.addEventListener('scroll', function() {
alert('Scroll');
}, false);
.test-scroll {
height: 2000px;
overflow-x: none;
overflow-y: scroll;
border: 1px solid #000;
}
<div class="test-scroll"> </div>