Warn don't throw when open is called on unattached element

Related microsoft/vscode#83016
This commit is contained in:
Daniel Imms
2019-10-22 06:56:05 -07:00
parent 2b39887a37
commit 3ce552cdec
2 changed files with 4 additions and 3 deletions
-3
View File
@@ -56,9 +56,6 @@ export class Terminal implements ITerminalApi {
this._core.resize(columns, rows);
}
public open(parent: HTMLElement): void {
if (!document.body.contains(parent)) {
throw new Error('open must be called on an element that is attached to the DOM');
}
this._core.open(parent);
}
public attachCustomKeyEventHandler(customKeyEventHandler: (event: KeyboardEvent) => boolean): void {