|
@@ -13,8 +13,7 @@
|
|
term.loadAddon(fitAddon);
|
|
term.loadAddon(fitAddon);
|
|
var linkAddon = new WebLinksAddon();
|
|
var linkAddon = new WebLinksAddon();
|
|
term.loadAddon(linkAddon);
|
|
term.loadAddon(linkAddon);
|
|
-
|
|
|
|
- onMount(function()
|
|
|
|
|
|
+ function initTerminal()
|
|
{
|
|
{
|
|
const consoleDiv = document.getElementById("console");
|
|
const consoleDiv = document.getElementById("console");
|
|
term.open(consoleDiv);
|
|
term.open(consoleDiv);
|
|
@@ -22,7 +21,8 @@
|
|
fitAddon.fit();
|
|
fitAddon.fit();
|
|
window.addEventListener("resize", function(ev){ fitAddon.fit(); });
|
|
window.addEventListener("resize", function(ev){ fitAddon.fit(); });
|
|
term.focus();
|
|
term.focus();
|
|
- });
|
|
|
|
|
|
+ }
|
|
|
|
+ onMount(initTerminal);
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<main class="flex flex-col w-full h-full">
|
|
<main class="flex flex-col w-full h-full">
|