Re-introduce original attach and webLinks addons back

We could release this in v3 if we don't break addons like this
This commit is contained in:
Daniel Imms
2019-05-10 20:30:47 -07:00
parent eedcbccb15
commit 518e2734ba
12 changed files with 622 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
/**
* Copyright (c) 2018 The xterm.js authors. All rights reserved.
* @license MIT
*
* Implements the attach method, that attaches the terminal to a WebSocket stream.
*/
import { Terminal, IDisposable } from 'xterm';
export interface IAttachAddonTerminal extends Terminal {
_core: {
register<T extends IDisposable>(d: T): void;
};
__socket?: WebSocket;
__attachSocketBuffer?: string;
__dataListener?: IDisposable;
__getMessage?(ev: MessageEvent): void;
__flushBuffer?(): void;
__pushToBuffer?(data: string): void;
__sendData?(data: string): void;
}