File tree Expand file tree Collapse file tree 1 file changed +3
-24
lines changed
utils/editors/js-console/html/output-console/v2.0 Expand file tree Collapse file tree 1 file changed +3
-24
lines changed Original file line number Diff line number Diff line change 379379
380380 var html = `
381381
382- <!DOCTYPE html>
383-
384- <html>
385- <head>
382+ <script>
386383
387- <script type=module>
388- /*
389- // Catch *everything* the iframe might throw
390- window.addEventListener("error", (e) => {
391- console.log("iframe error:", e.message);
392- });
393-
394- window.addEventListener("unhandledrejection", (e) => {
395- console.log("iframe unhandledrejection:", e.reason);
396- });
397- */
398-
399384 window.addEventListener('message',async({data})=>{
400385
401386 var {js} = data;
405390
406391 </scr` + `ipt>
407392
408- </head>
409-
410- <body>
411- </body>
412- </html>
413-
414393 ` ;
415394
416395
421400 obj . iframe = iframe ;
422401 document . body . append ( iframe )
423402
424- // iframe.style.display = 'none';
425- // iframe.sandbox = 'allow-scripts allow-same-origin';
403+ iframe . style . display = 'none' ;
404+ iframe . sandbox = 'allow-scripts allow-same-origin' ;
426405
427406 var blob = new Blob ( [ html ] , { type :'text/html' } ) ;
428407 var url = window . URL . createObjectURL ( blob ) ;
You can’t perform that action at this time.
0 commit comments