3 ms·
I've made a similar bug before. Had an animation that moved a div around on our page for some seconds. Some adblocker decided to remove that div. The script the
by maaaats 9y ago
I've made a similar bug before. Had an animation that moved a div around on our page for some seconds. Some adblocker decided to remove that div. The script then failed to grab that div for the reminder of the animation, 60 times a second. Since we logged all errors to backend, this resulted in hundreds of ajax calls, making the affected browsers kneel.
Backoff/rate limiting/setting an upper limit, and handling the missing div were solutions.
- gorhill 9y ago> Some adblocker decided to remove that div. The script then failed to grab that div for the reminder of the animation. Blockers do not remove DOM elements, they just apply a `display: none;` style property to them.
- maaaats 9y agoI may misremember the details, but the gist of it is that the blocker broke some invariant, so a state which should not be possible during the animation did occur and broke stuff hard :)
- thefifthsetpin 9y ago"Some adblocker" might not be one of the blockers that you are familiar with.
- gorhill 9y agoYes, I was assuming a known blocker. I know none that removes DOM elements.
- efraim 9y agogorhill created and maintains uBlock so he is probably familiar with how adblockers work.
- JCharante 9y agoThat might be true, but I'd expect the creator of uBlock Origin to be familiar with a fair amount of ad & wide-spectrum blockers and how they function (to see if there's any methods they can adopt to improve).