Skip to content

Commit 0fb91b9

Browse files
save file
1 parent 40ed413 commit 0fb91b9

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,13 @@
286286
var html = `
287287
<script>
288288
289-
289+
window.addEventListener('message',({data})=>{
290+
291+
var {js} = data;
292+
window.eval(js);
293+
294+
});
295+
290296
</scr`+`ipt>
291297
`;
292298

@@ -324,11 +330,12 @@
324330
clear();
325331
}
326332

333+
iframe.contentWindow.postMessage({js});
327334

328-
var result = await win.eval(js);
329-
resolve(result);
335+
//var result = await win.eval(js);
336+
//resolve(result);
330337

331-
iframe.remove();
338+
//iframe.remove();
332339

333340
}//onload
334341

0 commit comments

Comments
 (0)