From 37a4100220ed19e003b39e4c3c23acbfe207fea1 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Fri, 8 Oct 2021 07:45:48 -0700 Subject: [PATCH] throw if activate webgl called on safari --- addons/xterm-addon-webgl/src/WebglAddon.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/xterm-addon-webgl/src/WebglAddon.ts b/addons/xterm-addon-webgl/src/WebglAddon.ts index ad2393d8..b8bcf5b1 100644 --- a/addons/xterm-addon-webgl/src/WebglAddon.ts +++ b/addons/xterm-addon-webgl/src/WebglAddon.ts @@ -8,6 +8,7 @@ import { WebglRenderer } from './WebglRenderer'; import { ICharacterJoinerService, IRenderService } from 'browser/services/Services'; import { IColorSet } from 'browser/Types'; import { EventEmitter } from 'common/EventEmitter'; +import { isSafari } from 'common/Platform'; export class WebglAddon implements ITerminalAddon { private _terminal?: Terminal; @@ -23,6 +24,9 @@ export class WebglAddon implements ITerminalAddon { if (!terminal.element) { throw new Error('Cannot activate WebglAddon before Terminal.open'); } + if (isSafari) { + throw new Error('Webgl is not currently supported on Safari'); + } this._terminal = terminal; const renderService: IRenderService = (terminal as any)._core._renderService; const characterJoinerService: ICharacterJoinerService = (terminal as any)._core._characterJoinerService;