Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

页面存在iframe的话,iframe区域会空白 #158

Open
MQpeng opened this issue Jun 11, 2024 · 7 comments
Open

页面存在iframe的话,iframe区域会空白 #158

MQpeng opened this issue Jun 11, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@MQpeng
Copy link

MQpeng commented Jun 11, 2024

Version of js-screen-shot

1.9.9-rc.18

Operating system and its version

No response

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

页面存在iframe的话,iframe区域会空白,好像是html2canvas需要额外传入iframe的body

报错信息

No response

@MQpeng MQpeng added the bug Something isn't working label Jun 11, 2024
@likaia
Copy link
Owner

likaia commented Jun 11, 2024

Hello @MQpeng. Your feedback has been received, and you will be notified in the issue area when the problem is resolved.
你好 @MQpeng,已收到你反馈的问题,问题解决后将在issue区域通知你。

@likaia
Copy link
Owner

likaia commented Jun 11, 2024

Version of js-screen-shot

1.9.9-rc.18

Operating system and its version

No response

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

页面存在iframe的话,iframe区域会空白,好像是html2canvas需要额外传入iframe的body

报错信息

No response

html2canvas支持iframe了吗?

@MQpeng
Copy link
Author

MQpeng commented Jun 11, 2024

html2canvas支持iframe了吗?

目前只找到这个方案,没有进行实际测试
niklasvh/html2canvas#3095 (comment)

@superlvming
Copy link

hello, 为了解决无法截取 iframe 内容的问题,我设置了 screenShotDom,但是这样就会导致截图的时候左侧出现 screenShotDom 的预览图!请问是否有办法隐藏该预览图?

Snipaste_2024-06-13_18-12-19

@likaia
Copy link
Owner

likaia commented Jun 14, 2024

html2canvas支持iframe了吗?

目前只找到这个方案,没有进行实际测试 niklasvh/html2canvas#3095 (comment)

辛苦你帮忙测测,如果能成的话,我就集成进去

@likaia
Copy link
Owner

likaia commented Jun 14, 2024

hello, 为了解决无法截取 iframe 内容的问题,我设置了 screenShotDom,但是这样就会导致截图的时候左侧出现 screenShotDom 的预览图!请问是否有办法隐藏该预览图?

Snipaste_2024-06-13_18-12-19

试一下这个思路:在截图响应回调函数里,把这个预览dom隐藏?

@sujie056520
Copy link

请问下,iframe区域空白问题解决了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants