Remove terminal references on dispose

Part of #1341
Fixes #1370
This commit is contained in:
Daniel Imms
2018-04-04 11:51:50 -07:00
parent 989f5873f5
commit e5ee76ded4
5 changed files with 63 additions and 19 deletions
+9 -1
View File
@@ -251,7 +251,7 @@ declare module 'xterm' {
/**
* The class that represents an xterm.js terminal.
*/
export class Terminal implements IEventEmitter {
export class Terminal implements IEventEmitter, IDisposable {
/**
* The element containing the terminal.
*/
@@ -451,8 +451,16 @@ declare module 'xterm' {
*/
selectLines(start: number, end: number): void;
/*
* Disposes of the terminal, detaching it from the DOM and removing any
* active listeners.
*/
dispose(): void;
/**
* Destroys the terminal and detaches it from the DOM.
*
* @deprecated Use dispose() instead.
*/
destroy(): void;