当iframe加载完成但无法获取contentWindow时,确保正确移除临时iframe
@@ -1700,10 +1700,11 @@ const elementDone = async (element: any, slideIndex: number) => {
isHTML: false,
url: iframeSrc
}
- }
+ }
+ else {
// 加载完成但无法获取contentWindow,也要移除iframe
- document.body.removeChild(tempIframe)
-
+ document.body.removeChild(tempIframe)
catch (error) {
console.log(`iframe ${iframeSrc} 无法获取contentWindow,使用HTML方式:`, error)