Skip to content

Commit 40ed413

Browse files
save file
1 parent 257c64a commit 40ed413

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -282,19 +282,22 @@
282282
js = '(async()=>{\n'+js+'\n})()';
283283
}
284284

285-
iframe = document.createElement('iframe');
286-
obj.iframe = iframe;
287-
iframe.sandbox = 'allow-scripts allow-same-origin';
285+
288286
var html = `
289287
<script>
290288
291-
${js}
292-
289+
293290
</scr`+`ipt>
294291
`;
295-
var url = window.URL.createObjectURL(new Blob([html],{type:'text/html'}));
296-
iframe.src = url;
297-
iframe.onload = onload;
292+
293+
294+
iframe = document.createElement('iframe');
295+
obj.iframe = iframe;
296+
iframe.sandbox = 'allow-scripts allow-same-origin';
297+
var blob = new Blob([html],{type:'text/html'});
298+
var url = window.URL.createObjectURL(blob);
299+
iframe.src = url;
300+
iframe.onload = onload;
298301
cur.root.append(iframe);
299302

300303
return promise;
@@ -322,10 +325,10 @@
322325
}
323326

324327

325-
//var result = await win.eval(js);
326-
//resolve(result);
328+
var result = await win.eval(js);
329+
resolve(result);
327330

328-
//iframe.remove();
331+
iframe.remove();
329332

330333
}//onload
331334

0 commit comments

Comments
 (0)