We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0362b5 commit 9709717Copy full SHA for 9709717
public/global.css
@@ -343,6 +343,7 @@ main {
343
margin: 0 auto;
344
height: 100%;
345
box-sizing: border-box;
346
+ display: flex;
347
}
348
349
section {
src/Output.svelte
@@ -15,8 +15,22 @@
15
<head>
16
<script type="module">
17
18
+ let c;
19
+
20
+ function update(source) {
21
+ const blob = new Blob([source], { type: 'text/javascript' });
22
+ const url = URL.createObjectURL(blob);
23
24
+ import(url).then(({ default: App }) => {
25
+ if (c) c.$destroy();
26
27
+ document.body.innerHTML = '';
28
+ c = new App({ target: document.body })
29
+ })
30
+ }
31
32
window.addEventListener('message', event => {
- console.log(event.data)
33
+ update(event.data)
34
}, false)
35
<\/script>
36
</head>
0 commit comments