I'm trying to write a chrome extension that scrolls through a particular page after it's been created as a background tab. The code I have recursively scrolls until the bottom of the page (each iteration checks scrollTop, terminating if N value == N-1 value) and is working if I have that tab focused, but it doesn't if it's in the background/not visible (which is where it's primary use case is intended to be).
I'm guessing this because of a decision in webkit/blink to enforce lazy loading/rendering behaviour to save resources, hoping there is a way around it. I've tried a few techniques listed here to try to force a re-paint in conventional ways to no avail.
Any tips would be greatly appreciated!