You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some apps with micro frontends utilize tons of <iframe> elements to render out their UI.
This is yet to be tested, but as far as I know trying to embed any<iframe> into the exported image will result in a transparent box in place of its contents.
Possible solution would be either to clone the frame via contentWindow/contentDocument or we'd need to make users load a helper library inside the frame and communicate with it via iframe.postMessage.
The text was updated successfully, but these errors were encountered:
I tried to use Pico and ran into that issue (our whole app is running inside an iframe during development for some... valid reasons). So using Pico would only screenshot all the devtools we have around the iframe and not the app itself inside it.
I wanted to only screenshot the iframe itself next, since that's what I actually care about, doing something like:
But this crashed due to getWindowInfo checking the instanceof compared to the global ones. Can be solved by doing:
if(!($htmlinstanceof$window.HTMLHtmlElement)){returnleft(err('Failed to get HTMLHtmlElement'))}if(!($bodyinstanceof$window.HTMLBodyElement)){returnleft(err('Failed to get HTMLBodyElement'))}
(there is a Typescript error but that's actually valid)
This will now screenshot the content of the iframe but without the correct rendering. Seems like most CSS (if not all) is missing.
Some apps with micro frontends utilize tons of
<iframe>
elements to render out their UI.This is yet to be tested, but as far as I know trying to embed any
<iframe>
into the exported image will result in a transparent box in place of its contents.Possible solution would be either to clone the frame via
contentWindow
/contentDocument
or we'd need to make users load a helper library inside the frame and communicate with it viaiframe.postMessage
.The text was updated successfully, but these errors were encountered: