mirror of
https://github.com/tsl0922/ttyd.git
synced 2026-02-06 01:54:24 +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;
|
||||
|
||||
2
src/index.html
vendored
2
src/index.html
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user