test
This commit is contained in:
parent
e45936b53f
commit
02c62d2bc7
@ -288,9 +288,7 @@ export function ActionItem(p: { action: ActionInfo, identifierSubstring?: string
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
const Terminal = window.Terminal;
|
const terminalContainer = document.getElementById('root');
|
||||||
const FitAddon = window.FitAddon;
|
|
||||||
const terminalContainer = document.getElementById('terminal-container');
|
|
||||||
|
|
||||||
const terminal = new Terminal();
|
const terminal = new Terminal();
|
||||||
const fitAddon = new FitAddon();
|
const fitAddon = new FitAddon();
|
||||||
@ -306,11 +304,11 @@ export function ActionItem(p: { action: ActionInfo, identifierSubstring?: string
|
|||||||
};
|
};
|
||||||
|
|
||||||
socket.addEventListener('open', () => {
|
socket.addEventListener('open', () => {
|
||||||
socket.send(JSON.stringify({ CommandType: 'resize', Arguments: \`\${terminal.cols}x\`\${terminal.rows} }));
|
socket.send(JSON.stringify({ CommandType: 'resize', Arguments: \`\${terminal.cols}x\${terminal.rows}\` }));
|
||||||
});
|
});
|
||||||
|
|
||||||
terminal.onResize(({ cols, rows }) => {
|
terminal.onResize(({ cols, rows }) => {
|
||||||
socket.send(JSON.stringify({ CommandType: 'resize', Arguments: \`\${cols}x\`\${rows} }));
|
socket.send(JSON.stringify({ CommandType: 'resize', Arguments: \`\${cols}x\${rows}\` }));
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.addEventListener('message', (event) => {
|
socket.addEventListener('message', (event) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user