likaia / js-screen-shot

web端自定义截图插件(原生JS版)
https://www.kaisir.cn/js-screen-shot/
MIT License
765 stars 105 forks source link

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

Open MQpeng opened 3 months ago

MQpeng commented 3 months ago

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

likaia commented 3 months ago

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

likaia commented 3 months ago

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 commented 3 months ago

html2canvas支持iframe了吗?

目前只找到这个方案,没有进行实际测试 https://github.com/niklasvh/html2canvas/issues/3095#issuecomment-1798219640

superlvming commented 3 months ago

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

Snipaste_2024-06-13_18-12-19

likaia commented 3 months ago

html2canvas支持iframe了吗?

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

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

likaia commented 3 months ago

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

Snipaste_2024-06-13_18-12-19

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

sujie056520 commented 2 weeks ago

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