Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onConnectionOpen(data: any): void {
this.socket.send(JSON.stringify({'Op': 'bind', 'data': JSON.stringify(data)}));
winptyCompat.winptyCompatInit(this.xterm);
webLinks.webLinksInit(this.xterm);
this.onTerminalResize();
this.xterm.focus();
}
cursorBlink: false,
cols: 100,
rows: 30,
scrollback: 5000,
tabStopWidth: 4
}, opts)
if (process.platform === 'win32') {
opts.windowsMode = true
}
this.terminal = new Terminal(opts)
this.setTitle('Terminal')
webLinks.webLinksInit(this.terminal, (ev, uri) => openExternal(uri))
this.persistentState = {}
this.persistentState.opts = opts
this.classname = ''
this.enterhandler = (e) => {
if (!this.ty && e.keyCode == 13) {
if (this.startRequested) {
this.startRequested()
}
return false
}
return e
}
this.terminal.attachCustomKeyEventHandler(this.enterhandler)