throw if activate webgl called on safari
This commit is contained in:
@@ -8,6 +8,7 @@ import { WebglRenderer } from './WebglRenderer';
|
|||||||
import { ICharacterJoinerService, IRenderService } from 'browser/services/Services';
|
import { ICharacterJoinerService, IRenderService } from 'browser/services/Services';
|
||||||
import { IColorSet } from 'browser/Types';
|
import { IColorSet } from 'browser/Types';
|
||||||
import { EventEmitter } from 'common/EventEmitter';
|
import { EventEmitter } from 'common/EventEmitter';
|
||||||
|
import { isSafari } from 'common/Platform';
|
||||||
|
|
||||||
export class WebglAddon implements ITerminalAddon {
|
export class WebglAddon implements ITerminalAddon {
|
||||||
private _terminal?: Terminal;
|
private _terminal?: Terminal;
|
||||||
@@ -23,6 +24,9 @@ export class WebglAddon implements ITerminalAddon {
|
|||||||
if (!terminal.element) {
|
if (!terminal.element) {
|
||||||
throw new Error('Cannot activate WebglAddon before Terminal.open');
|
throw new Error('Cannot activate WebglAddon before Terminal.open');
|
||||||
}
|
}
|
||||||
|
if (isSafari) {
|
||||||
|
throw new Error('Webgl is not currently supported on Safari');
|
||||||
|
}
|
||||||
this._terminal = terminal;
|
this._terminal = terminal;
|
||||||
const renderService: IRenderService = (terminal as any)._core._renderService;
|
const renderService: IRenderService = (terminal as any)._core._renderService;
|
||||||
const characterJoinerService: ICharacterJoinerService = (terminal as any)._core._characterJoinerService;
|
const characterJoinerService: ICharacterJoinerService = (terminal as any)._core._characterJoinerService;
|
||||||
|
|||||||
Reference in New Issue
Block a user