You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
i am developing a library for a site, in which a have a scroll listener and check if a specific div is visible.
when i reach that point i immediately remove the scroll listener and do an ad call
However although i remove the listener it continues to fire again and again. As a result a have multiple ad calls. I tried to block the zone.js script using ublock extention and everything works ok. So it seems that its a zone.js issue
heres is my code snippet
var addScrollListener = function(){
if (isDebug()){
window.addEventListener('scroll', onScroll);
}
}
var onScroll = function(event){
if (isAdVisible()){
console.log(event);
window.removeEventListener('scroll', onScroll);
loadAdTad();
}
}
var bindEvents = function(){
addScrollListener();
}
bindEvents();
Hello,
i am developing a library for a site, in which a have a scroll listener and check if a specific div is visible.
when i reach that point i immediately remove the scroll listener and do an ad call
the site where my library runs has the
on it.
However although i remove the listener it continues to fire again and again. As a result a have multiple ad calls. I tried to block the zone.js script using ublock extention and everything works ok. So it seems that its a zone.js issue
heres is my code snippet
am i doing something wrong?