Add broken demo to investigate

This commit is contained in:
Simon Lamon
2022-10-09 14:26:08 +00:00
parent bd661fdb07
commit 627410a537
4 changed files with 30 additions and 29 deletions
+1 -3
View File
@@ -25,9 +25,7 @@ export class CanvasAddon extends Disposable implements ITerminalAddon {
public activate(terminal: Terminal): void {
const core = (terminal as any)._core;
if (!terminal.element) {
this.register(toDisposable(() => {
core.onWillOpen(() => this.activate(terminal));
}));
this.register(core.onWillOpen(() => this.activate(terminal)));
return;
}
+1 -3
View File
@@ -33,9 +33,7 @@ export class WebglAddon extends Disposable implements ITerminalAddon {
}
const core = (terminal as any)._core;
if (!terminal.element) {
this.register(toDisposable(() => {
core.onWillOpen(() => this.activate(terminal));
}));
this.register(core.onWillOpen(() => this.activate(terminal)));
return;
}
this._terminal = terminal;
@@ -103,6 +103,9 @@ export class WebglRenderer extends Disposable implements IRenderer {
throw new Error('WebGL2 not supported ' + this._gl);
}
// TODO: Remove me.
throw new Error('WebGL2 not supported ' + this._gl);
this.register(addDisposableDomListener(this._canvas, 'webglcontextlost', (e) => {
console.log('webglcontextlost event received');
// Prevent the default behavior in order to enable WebGL context restoration.