Open tatai opened 8 years ago
@tatai Any chance you'd be able to share the code here? I'm trying to get this going as well but to no avail.
@pribeh I created pul request #136 but it does not passed all tests so it cannot be evaluated for merging. Hopefully this week or next I will have some time to fix it. Feedback is welcomed
slotRenderEnded
listener is still being added on each $.dfp call.
Hi,
First of all, thanks for creating this plugin.
I have a page with an infinite scroll and I have followed the steps given in the instructions and also explained in some issues like #112, but when I create a callback to afterEachAdLoaded, each time I invoke dfp() to define the new ad, afterEachAdLoaded receives a repeated callback.
I have followed the code and I think the issue is related to the pubadsService.addEventListener('slotRenderEnded') made on line 137. This listener is added with each call to dfp().
I cannot show public code right now, but it can be reproduced with:
The output shown in the console will be something like:
After some develop I have created a version that distinguishes between "init" and "new ad" calls.
I am going to make a pull request for your consideration. I have made a strong effort to make it backward-compatible with current code.
I have not added the minified version or propose changes in the readme prior to your comments.