mirror of
https://git.proxmox.com/git/mirror_xterm.js
synced 2025-10-17 17:00:31 +00:00
46 lines
1.3 KiB
ReStructuredText
46 lines
1.3 KiB
ReStructuredText
.. xterm.js documentation master file, created by
|
|
sphinx-quickstart on Tue Mar 25 17:38:05 2014.
|
|
You can adapt this file completely to your liking, but it should at least
|
|
contain the root `toctree` directive.
|
|
|
|
Welcome to xterm.js's documentation!
|
|
====================================
|
|
|
|
This is the documentation for xterm.js. Xterm.js is a full xterm clone, written completely in JavaScript.
|
|
|
|
Xterm.js supplies a modular, event-based interface that lets developers build addons and themes that augment
|
|
the experience of running a fully-feature terminal inside the browser.
|
|
|
|
Xterm.js serves as the foundation for the terminal found at www.sourcelair.com.
|
|
|
|
.. image:: screenshot.png
|
|
|
|
Getting started
|
|
^^^^^^^^^^^^^^^
|
|
|
|
.. code-block:: javascript
|
|
|
|
var term = new Terminal(),
|
|
url = 'ws://docker/containers/mycontainer/attach/ws/?stdin=1&stdout=1&stderr=1&logs=1',
|
|
socket = new WebSocket(url);
|
|
|
|
term.open(document.body);
|
|
term.on('data', function (data) {
|
|
socket.send(data);
|
|
});
|
|
socket.onmessage = function (e) {
|
|
term.write(e.data);
|
|
}
|
|
|
|
|
|
Contents
|
|
^^^^^^^^
|
|
The standard way to create a terminal-based application with xterm.js is to work with its events and
|
|
methods, that let you manipulate input, output, state and size of the terminal.
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
methods
|
|
events
|