]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
[attach addon] Document with JSDoc
authorParis <paris@sourcelair.com>
Tue, 24 Feb 2015 20:28:47 +0000 (22:28 +0200)
committerParis <paris@sourcelair.com>
Tue, 24 Feb 2015 20:28:47 +0000 (22:28 +0200)
addons/attach/attach.js

index c12b513502dbda9a6bf9effaaf3266cb13bb6fdc..5d74b17ca5b74b317e9d9b680e15cfd8c0bc2d9d 100644 (file)
         attach(this.Xterm);
     }
 })(function (Xterm) {
+    /**
+     * Attaches the current terminal to the given socket
+     *
+     * @param {WebSocket} socket - The socket to attach the current terminal
+     * @param {boolean} bidirectional - Whether the terminal should send data
+     *                                  to the socket as well
+     * @param {boolean} buffered - Whether the rendering of incoming data
+     *                             should happen instantly or at a maximum
+     *                             frequency of 1 rendering per 10ms
+     */
     Xterm.prototype.attach = function (socket, bidirectional, buffered) {
         var term = this;
 
         socket.addEventListener('error', term.detach.bind(term, socket));
     };
 
+    /**
+     * Detaches the current terminal from the given socket
+     *
+     * @param {WebSocket} socket - The socket from which to detach the current
+     *                             terminal
+     */
     Xterm.prototype.detach = function (socket) {
         var term = this;