forked from Develatio/nebulant-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxtermjs.html
More file actions
27 lines (23 loc) · 863 Bytes
/
xtermjs.html
File metadata and controls
27 lines (23 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html>
<head>
<title>xterm.js test</title>
<meta charset="UTF-8" />
<script src="https://cdn.jsdelivr.net/npm/xterm@5.1.0/lib/xterm.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/xterm@5.1.0/css/xterm.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/xterm-addon-attach@0.8.0/lib/xterm-addon-attach.min.js"></script>
<script>
window.onload = function () {
const term = new window.Terminal();
const socket = new WebSocket("ws://localhost:6565");
const attachAddon = new AttachAddon.AttachAddon(socket);
term.open(document.getElementById("terminal"));
term.loadAddon(attachAddon);
};
</script>
</head>
<body>
<h2 style="text-align: center">xterm.js test</h2>
<div id="terminal"></div>
</body>
</html>