Repository navigation
fix(capture): show same-origin iframe content in screenshots (19.3.2) - #184
Merged
Merged
Conversation
The capture cloned an <iframe> element but not its page. The renderer then loaded the frame's src without the user's session (a login page, or nothing), and frames written by script have no src at all, so dialogs and grids inside iframes showed up as empty boxes. Each same-origin frame's document now goes through the same capture as the page (masking, blocking, styles, images, nested frames) and is stored in the clone's srcdoc. Cross-origin frames, frames still loading their src, and pages whose Trusted Types policy refuses a plain srcdoc keep src as before. Canvases are detected by tag name, so a frame's canvas (another realm) is captured too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
<iframe>element but not its page. The renderer then loaded the frame'ssrcwithout the user's session (a login page, or nothing), and frames written by script have nosrcat all. Dialogs and grids that apps draw inside iframes showed up as empty boxes. Replays were fine, because rrweb records same-origin frames.src/ScreenCapture.js): each same-origin frame's document now goes through the same capture as the page (masking and blocking rules, styles, images, nested frames) and is stored in the clone'ssrcdoc, which the renderer shows instead of loadingsrc.about:blankwhile loadingsrc, and pages whose Trusted Types policy refuses a plainsrcdockeepsrcexactly as before.npm run buildoutput (build/,published/19.3.2/,published/latest/).Testing
ScreenCapture.test.js(frame content and styles, nested frames, masking inside frames,src="about:blank"frames written by script, Trusted Types fallback, cross-origin and still-loading frames). Full suite: 32/32 suites, 571/571 tests.srcpointed at a 404. Dialog and grid render fromsrcdoc.Notes
srcdocframe). Without it, frame content still shows, just without those.🤖 Generated with Claude Code