mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-11-17 03:16:59 +00:00
Puppeteer - Use a modern scroll method for screenshot stitching
This commit is contained in:
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
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user