MicroRepl poc

This commit is contained in:
Felix Roos 2023-12-15 22:23:20 +01:00
parent 8e35079fd1
commit 93e8186388
6 changed files with 206 additions and 5 deletions

View file

@ -92,6 +92,12 @@ class StrudelRepl extends HTMLElement {
afterEval: ({ code }) => {
// window.location.hash = '#' + code2hash(code);
},
onUpdateState: (state) => {
const event = new CustomEvent('update', {
detail: state,
});
this.dispatchEvent(event);
},
});
// init settings
this.editor.updateSettings(this.settings);