Skip to content

Commit 9912be3

Browse files
save file
1 parent b869ff8 commit 9912be3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,15 @@
285285
iframe = document.createElement('iframe');
286286
obj.iframe = iframe;
287287
iframe.sandbox = 'allow-scripts allow-same-origin';
288-
var html = '';
289-
iframe.srcdoc = `<script>${js}</scr`+`ipt>`;
288+
var html = `
289+
<script>
290+
291+
${js}
292+
293+
</scr`+`ipt>
294+
`;
295+
var url = window.URL.createObhectURL(new Blob([html]));
296+
iframe.src = url;
290297
iframe.onload = onload;
291298
cur.root.append(iframe);
292299

0 commit comments

Comments
 (0)