Skip to content

Conversation

@absarasw
Copy link

Add ability to capture full-page screenshots of iframe content by
temporarily expanding the iframe to reveal all scrollable content.

Changes:

  • Add iframeUid parameter to explicitly target an iframe for capture
  • Auto-detect main content iframe when fullPage=true is used
  • Temporarily expand iframe dimensions to capture full scrollable content
  • Restore original iframe styles after screenshot capture
  • Add proper element handle disposal for better memory management

This enables capturing complete iframe content (like embedded editors or
content frames) that would otherwise be clipped to the visible viewport.

@OrKoN
Copy link
Collaborator

OrKoN commented Jan 12, 2026

cc @natorion wdyt?

'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
Copy link
Collaborator

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);
Copy link
Collaborator

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?

@natorion
Copy link
Contributor

cc @natorion wdyt?

I think this is fine, but the warning should be also highlight potential other issues, no?

absarasw and others added 3 commits January 19, 2026 16:04
…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.
@absarasw
Copy link
Author

@OrKoN , @natorion , can you please review changes again?

@absarasw absarasw requested a review from OrKoN January 19, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants