The useToPng hook from @hugocxl/react-to-image is not working as expected when trying to convert an iframe to a PNG image. The resulting image is blank white, despite the iframe containing visible content.
Link to Reproduction
See the on the additional information
Steps to reproduce
Create a React component with an iframe.
Implement the useToPng hook from @hugocxl/react-to-image.
Attempt to convert the iframe to a PNG image.
Observe that the resulting image is blank white.
Version
0.0.8
Browser
Google Chrome Version 127.0.6533.72 (Official Build) (arm64)
Operating System
[x] Windows
[X] macOS
[X] Linux
Additional Information
This issue may be related to cross-origin restrictions when trying to access iframe content. It would be helpful if the library could provide more detailed error information or alternative methods for capturing iframe content.
Description
The
useToPng
hook from @hugocxl/react-to-image is not working as expected when trying to convert an iframe to a PNG image. The resulting image is blank white, despite the iframe containing visible content.Link to Reproduction
See the on the additional information
Steps to reproduce
useToPng
hook from @hugocxl/react-to-image.Version
0.0.8
Browser
Google Chrome Version 127.0.6533.72 (Official Build) (arm64)
Operating System
Additional Information
This issue may be related to cross-origin restrictions when trying to access iframe content. It would be helpful if the library could provide more detailed error information or alternative methods for capturing iframe content.
Here's a code snippet demonstrating the issue:
Any insights or potential solutions would be greatly appreciated. Thank you for your time and effort in maintaining this library!