Add attach addon

This commit is contained in:
Daniel Imms
2019-05-31 19:58:12 -07:00
parent 1cde8a3167
commit a1a63f99ff
15 changed files with 4112 additions and 16 deletions
+34
View File
@@ -0,0 +1,34 @@
/**
* Copyright (c) 2017 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { Terminal, ILinkMatcherOptions } from 'xterm';
// TODO: This is temporary, link to xterm when the new version is published
export interface ITerminalAddon {
activate(terminal: Terminal): void;
dispose(): void;
}
export interface IAttachOptions {
/**
* Whether input should be written to the backend. Defaults to `true`.
*/
bidirectional?: boolean,
/**
* Whether to use UTF8 binary transport for incoming messages. Defaults to `false`.
* Note: This must be in line with the server side of the websocket.
* Always send string messages from the backend if this options is false,
* otherwise always binary UTF8 data.
*/
inputUtf8?: boolean
}
export class AttachAddon implements ITerminalAddon {
constructor(socket: WebSocket, options?: IAttachOptions);
public activate(terminal: Terminal): void;
public dispose(): void;
}