     }
                };
            }

            class WasmTerminal {
                constructor() {
                    try {
                        this.history = JSON.parse(sessionStorage.getItem('__python_wasm_repl.history'));
                        this.historyBuffer = this.history.slice();
                    } catch(e) {
                        this.history = [];
                        this.historyBuffer = [];
                    }
                    this.reset();

                    this.x