remove onReady callback

+ use strudelTheme as default
This commit is contained in:
Felix Roos 2023-12-15 11:21:48 +01:00
parent 9872a89a29
commit be1e5a7d0e

View File

@ -22,7 +22,7 @@ const initialSettings = {
isFlashEnabled: true,
isTooltipEnabled: false,
isLineWrappingEnabled: false,
theme: 'teletext',
theme: 'strudelTheme',
fontFamily: 'monospace',
fontSize: 18,
};
@ -47,9 +47,6 @@ class StrudelRepl extends HTMLElement {
constructor() {
super();
}
onReady(listener) {
this.readyListener = listener;
}
attributeChangedCallback(name, oldValue, newValue) {
if (name === 'code') {
this.code = newValue;
@ -88,7 +85,6 @@ class StrudelRepl extends HTMLElement {
// init settings
this.editor.updateSettings(this.settings);
this.editor.setCode(this.code);
this.readyListener?.(this);
// settingsMap.listen((settings, key) => editor.changeSetting(key, settings[key]));
// onEvent('strudel-toggle-play', () => this.editor.toggle());
}