Puppeteer - Use a modern scroll method for screenshot stitching

This commit is contained in:
dgtlmoon authored and GitHub committed 2026-02-18 10:01:22 +01:00
1 parent a6e55aaba9
commit 352c91c619
1 file changed
+2 -2
@@ -86,8 +86,8 @@ async def capture_full_page(page, screenshot_format='JPEG', watch_uuid=None, loc
# better than scrollTo incase they override it in the page
await page.evaluate(
"""(y) => {
document.documentElement.scrollTop = y;
document.body.scrollTop = y;
const el = document.scrollingElement;
if (el) el.scrollTop = y;
}""",
y
)