Sfoglia il codice sorgente

remove childen of frames

Former-commit-id: bfd490c9f2dbbb924356a55a2f47ea5744d8dd8e
Gildas 6 anni fa
parent
commit
38b1a94d45
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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);