apply attach changes to demo

This commit is contained in:
Jörg Breitbart
2019-05-13 00:58:14 +02:00
parent 031a30b007
commit 6fd5cdd8f1
+1 -4
View File
@@ -27,7 +27,6 @@ declare let window: IWindowWithTerminal;
Terminal.applyAddon(fit);
let term;
let attachAddon: AttachAddon;
let searchAddon: SearchAddon;
let protocol;
let socketURL;
@@ -90,8 +89,6 @@ function createTerminal(): void {
// Load addons
const typedTerm = term as TerminalType;
typedTerm.loadAddon(new WebLinksAddon());
attachAddon = new AttachAddon();
typedTerm.loadAddon(attachAddon);
searchAddon = new SearchAddon();
typedTerm.loadAddon(searchAddon);
@@ -152,7 +149,7 @@ function createTerminal(): void {
}
function runRealTerminal(): void {
attachAddon.attach(socket);
term.loadAddon(new AttachAddon(socket));
term._initialized = true;
}