feat(screenshot): implement lazy load#61
Open
rakuzen25 wants to merge 7 commits into
Open
Conversation
| await page.goto(url, {waitUntil: ["domcontentloaded", "networkidle2"]}) | ||
|
|
||
| await page.waitForSelector(selector) | ||
| if (lazyload) { |
| "height": 1280 | ||
| } | ||
|
|
||
| plugin_screenshot_lazyload: |
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Frank <25704248+rakuzen25@users.noreply.github.com>
lishaduck
self-requested a review
June 27, 2026 01:49
lishaduck
approved these changes
Jun 27, 2026
lishaduck
left a comment
Member
There was a problem hiding this comment.
Wins the hack of the year award but this is a pile of hacks atop hacks, LGTM.
This comment has been minimized.
This comment has been minimized.
Author
Pretty sure that's the only way to realistically trigger intersection observers... Man some frontend stuff were just never designed with automation in mind. |
Member
|
I just hate seeing a hardcoded "100ms", but I don't know that there's a better option. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a lazy load option to the screenshot plugin to ensure that images are loaded.