mirror of
https://github.com/tsl0922/ttyd.git
synced 2026-01-02 08:54:23 +01:00
html: attach the term instance to window
This commit is contained in:
@@ -86,6 +86,7 @@ export default class Xterm extends Component<Props> {
|
||||
this.socket = new WebSocket(this.props.url, ['tty']);
|
||||
this.terminal = new Terminal(this.props.options);
|
||||
const { socket, terminal, container, fitAddon, overlayAddon } = this;
|
||||
(window as any).term = terminal;
|
||||
|
||||
socket.binaryType = 'arraybuffer';
|
||||
socket.onopen = this.onSocketOpen;
|
||||
|
||||
Reference in New Issue
Block a user