-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Right now the code look like this:
https://github.com/yorickshan/html2canvas-pro/blob/main/src/dom/document-cloner.ts#L526
ownerDocument.body.appendChild(cloneIframeContainer);
The issue with this approach is that sometimes when the shadow-root element is rendered via html2canvas-pro
, the iframe should be added inside the shadow root
Imagine we have custom style
tags inside a shadow root. In our case, for some reason, such styles are not inlined to cloned nodes.
Then the iframe must be rendered inside the shadow root as well.
So an option like would work:
iframeParent: someNodeWithinShadowRoot
Or just automatically detect if a rendered node is inside a shadow root - append the iframe there as well, but this option technically a breaking behavior
Metadata
Metadata
Assignees
Labels
No labels