We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4734f1 commit cd24034Copy full SHA for cd24034
1 file changed
utils/editors/js-console/html/output-console/v2.0/output-console-v2.0.html
@@ -341,27 +341,17 @@
341
<head>
342
343
<script>
344
- window.addEventListener('message',({data})=>{
345
- console.log('message',data);
346
- var {type} = data;
347
- if(type==='run'){
348
- run();
349
- }
+ window.addEventListener('message',async({data})=>{
+
+ var {js} = data;
+ var blob = new Blob([js],{type:'text/javascript'});
+ var url = window.URL.createObjectURL(blob);
+ await import(url);
350
351
});
352
353
</scr`+`ipt>
354
355
- <script type=module>
356
-
357
- window.run=function(){
358
359
- ${js}
360
361
- }//run
362
363
- </scr`+`ipt>
364
365
</head>
366
367
<body>
0 commit comments