Skip to content

Conversation

@Shivanshu-07
Copy link
Contributor

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.

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