Skip to content

Commit 0751023

Browse files
save file
1 parent ea384b0 commit 0751023

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@
396396

397397

398398

399+
400+
399401
iframe = document.createElement('iframe');
400402
obj.iframe = iframe;
401403
document.body.append(iframe)
@@ -406,21 +408,14 @@
406408
var blob = new Blob([html],{type:'text/html'});
407409
var url = window.URL.createObjectURL(blob);
408410
iframe.onload = onload;
409-
iframe.src = url;
411+
iframe.srcdoc = '';
410412
//cur.root.append(iframe);
411413

412414
return promise;
413415

414416

415417
async function onload(){
416418

417-
//setTimeout(complete,100);
418-
419-
//}//onload
420-
421-
422-
//async function complete(){
423-
424419
var win = iframe.contentWindow;
425420

426421
win.focus();
@@ -435,10 +430,10 @@
435430

436431
iframe.contentWindow.postMessage({js},'*');
437432

438-
//var result = await win.eval(js);
439-
//resolve(result);
433+
var result = await win.eval(js);
434+
resolve(result);
440435

441-
//iframe.remove();
436+
iframe.remove();
442437

443438
}//onload
444439

0 commit comments

Comments
 (0)