-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(screenshot): add full-page screenshot support for iframes #685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(screenshot): add full-page screenshot support for iframes #685
Conversation
|
cc @natorion wdyt? |
src/tools/screenshot.ts
Outdated
| 'If set to true takes a screenshot of the full page instead of the currently visible viewport. Incompatible with uid.', | ||
| 'If set to true takes a screenshot of the full page instead of the currently visible viewport. Incompatible with uid unless iframeUid is also provided.', | ||
| ), | ||
| iframeUid: zod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be done without introducing a new parameter? e.g., detect if uid points to an iframe element?
| responseMessage = "Took a screenshot of the current page's viewport."; | ||
| } | ||
|
|
||
| response.appendResponseLine(responseMessage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be possible to add test coverage including local and out-of-process iframes?
I think this is fine, but the warning should be also highlight potential other issues, no? |
…for dashboard layouts, and simplified the API by removing iframeUid parameter—iframes are now auto-detected when uid + fullPage are used together. * Adding test coverage for scrollable containers, local iframes (auto-detection), and cross-origin iframe fallback behavior.
Add ability to capture full-page screenshots of iframe content by
temporarily expanding the iframe to reveal all scrollable content.
Changes:
iframeUidparameter to explicitly target an iframe for capturefullPage=trueis usedThis enables capturing complete iframe content (like embedded editors or
content frames) that would otherwise be clipped to the visible viewport.