Allow setting renderer addon before open is called

This commit is contained in:
Daniel Imms
2022-09-24 14:41:48 -07:00
parent a9eea3fd46
commit 693d09cbad
7 changed files with 62 additions and 27 deletions
+2 -1
View File
@@ -26,7 +26,8 @@ export class WebglAddon implements ITerminalAddon {
public activate(terminal: Terminal): void {
if (!terminal.element) {
throw new Error('Cannot activate WebglAddon before Terminal.open');
(terminal as any)._core.onWillOpen(() => this.activate(terminal));
return;
}
if (isSafari) {
throw new Error('Webgl is not currently supported on Safari');