refactoring in playground, use zip file for web

This commit is contained in:
2024-12-08 20:19:55 -08:00
parent 0f5a909cce
commit d6aaaaabf1
47 changed files with 1932 additions and 88 deletions

View File

@@ -1,31 +1,6 @@
<html>
<head>
<script>
realLog = console.log
messages = []
console.log = (...args) => {
window.parent.postMessage({message: args.join(' ')}, '*')
// messages.push(args.join(' '))
realLog(...args)
}
window.addEventListener('message', (ev) => {
realLog('got', ev)
let {cmd, src} = ev.data
if (cmd === 'exec') {
try {
window.parent.postMessage({messages: []}, '*')
eval(src)
} catch (e) {
console.log(e)
}
}
// window.parent.postMessage({messages}, '*')
messages = []
})
realLog('IFRAME INITIALIZED')
</script>
</head>
<body>
</body>
<head>
<script src="frame.js"></script>
</head>
<body></body>
</html>