We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 826c38d commit e66c708Copy full SHA for e66c708
utils/editors/js-console/html/output-console/v2.0/output-console-v2.0.html
@@ -298,6 +298,30 @@
298
`;
299
300
301
+var html = `
302
+
303
+<script type="module">
304
+ window.addEventListener("message", async (event) => {
305
+ try {
306
+ // Wrap the code in a module so dynamic import works
307
+ const blob = new Blob([event.data.js], { type: "text/javascript" });
308
+ const url = URL.createObjectURL(blob);
309
+ await import(url);
310
+ URL.revokeObjectURL(url);
311
+ } catch (e) {
312
+ console.error("Module error:", e);
313
+ }
314
+ });
315
+</scr`+`ipt>
316
317
318
+`;
319
320
321
322
323
324
325
iframe = document.createElement('iframe');
326
obj.iframe = iframe;
327
iframe.sandbox = 'allow-scripts allow-same-origin';
0 commit comments