I have an Angular directive and I'm trying to console.log in bind('scroll') event on an element in IE 11 but can't.
This works fine on Chrome and other browsers. Is this a known issue?
app.directive('infiniteScroller',['$document',function($document){return{
restrict:'AE',
link:function($scope, $element, $attrs){var elm = document.querySelector('.class-for-some-div');var elm2 = $($element).closest('.class-for-some-div');
console.log('infiniteScroller initialized, querysel, jquery', elm, elm2);
elm.onscroll =function(event){
console.log('in bind scroll');};
elm.addEventListener('scroll',function(){
console.log('addEventListener scroll');},false);// elm.attachEvent('onscroll',function() {// console.log('attachEvent onscroll');// }); //doesn't work on Chrome or IE
elm2.bind('DOMMouseScroll',function(){
console.log('bind DOMMouseScroll');});
elm2.bind('wheel',function(){
console.log('bind wheel');});elm2.bind('scroll', function() { console.log('bind scroll');});}};}]);