소스 검색

remove childen of frames

Former-commit-id: bfd490c9f2dbbb924356a55a2f47ea5744d8dd8e
Gildas 6 년 전
부모
커밋
38b1a94d45
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      lib/single-file/single-file-core.js

+ 1 - 0
lib/single-file/single-file-core.js

@@ -856,6 +856,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 						frameElement.removeAttribute("src");
 						frameElement.removeAttribute("srcdoc");
 					}
+					Array.from(frameElement.childNodes, node => node.remove());
 					const frameWindowId = frameElement.getAttribute(util.WIN_ID_ATTRIBUTE_NAME);
 					if (frameWindowId) {
 						const frameData = this.options.frames.find(frame => frame.windowId == frameWindowId);