Added Support for capturing CORS iFrames #557
Open
+466
−3
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.
This pull request introduces improved handling for dynamic resources and cross-origin iframes in the Playwright Percy integration, along with a package version bump and publishing tag update. The main focus is on ensuring that lazy-loaded images and blob-based background images are properly captured, and that cross-origin iframe content is serialized and included in snapshots.
Enhanced resource handling and iframe processing
Added a new handleDynamicResources function to the browser context that processes lazy-loaded images and blob-based background images before DOM serialization, ensuring these resources are captured in snapshots.
Updated the main snapshot flow to execute handleDynamicResources on both the main page and all cross-origin iframes prior to serialization.
Added logic to inject the Percy DOM script into cross-origin iframes, serialize their content, and merge their resources into the main snapshot. Also, updated the HTML to reference the correct iframe resource URLs.