aFarkas/lazysizes

How to deal if internet connection failed

PiklioBezGashti opened this issue · 0 comments

How can i manage when user lost internet connection and keep scrolling ? i would like to keep original src file and not to be replaced
i tried with code below but its keep senging it nonstop

document.addEventListener('error', function(e){ if(e.target.nodeName == 'IMG'){e.target.src = 'placeholder.jpg';} }, true);