Skip to content

Commit f888746

Browse files
save file
1 parent 6b5753b commit f888746

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

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

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,43 @@
377377
`;
378378

379379

380+
var html = `
381+
382+
<!DOCTYPE html>
383+
384+
<html>
385+
<head>
386+
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+
399+
window.addEventListener('message',async({data})=>{
400+
401+
var {js} = data;
402+
window.eval(js);
403+
404+
});
405+
406+
</scr`+`ipt>
407+
408+
</head>
409+
410+
<body>
411+
</body>
412+
</html>
413+
414+
`;
415+
416+
380417

381418

382419

0 commit comments

Comments
 (0)