Skip to content

Commit 82217a7

Browse files
save file
1 parent 89247e0 commit 82217a7

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

utils/editors/js-console/html/output/v2.0/output-v2.0.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@
7878
var shadow;
7979

8080
var output;
81-
81+
var iframe;
82+
83+
8284

8385
var chk = {};
8486
var btn = {};
@@ -199,7 +201,11 @@
199201
console.log('run.iframe');
200202
var resolve,promise=new Promise(res=>resolve=res);
201203

202-
var iframe = document.createElement('iframe');
204+
if(iframe){
205+
iframe.remove();
206+
}
207+
208+
iframe = document.createElement('iframe');
203209
iframe.srcdoc = '';
204210
iframe.onload = onload;
205211
root.append(iframe);
@@ -234,6 +240,7 @@
234240

235241
obj.kill = function(){
236242

243+
iframe.remove();
237244

238245
}//kill
239246

0 commit comments

Comments
 (0)