Compare commits

...
7 Commits
Author SHA1 Message Date
paris 3fca219404 [addon attach] Implement detach method (Bump to 0.20) 2014-09-18 10:02:29 +00:00
paris 6906bf3e7d Implement detach function 2014-09-18 10:01:54 +00:00
paris 670efc4454 Bump Bower version to 0.19 2014-09-18 09:06:53 +00:00
paris 74f9526177 [addon attach] Implement auto-detaching on socket close/error 2014-09-18 09:06:23 +00:00
paris 28b553caa6 Bump version to 0.18 2014-09-15 13:52:20 +00:00
paris 22ff176c6a Fix #5 2014-09-15 13:51:42 +00:00
paris d24e00554d Tiny README updates 2014-09-10 11:15:24 +00:00
5 changed files with 30 additions and 15 deletions
+5 -7
View File
@@ -2,20 +2,18 @@
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 supplies a modular, event-based interface that lets developers build addons and themes that augment the experience of running a fully-featured terminal inside the browser.
Xterm.js serves as the foundation for the terminal found at www.sourcelair.com.
Xterm.js serves as foundation for the terminal found at www.sourcelair.com.
![xterm.js screenshot](docs/screenshot.png)
### Contribution and License Agreement
If you contribute code to this project, you are implicitly allowing your code
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work.
If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work.
## License
Copyright (c) 2014, SourceLair, Limited (www.sourcelair.com) (MIT License)
Copyright (c) 2014, SourceLair, Ltd (www.sourcelair.com) (MIT License)
Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
+21 -5
View File
@@ -25,14 +25,30 @@
bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;
this.socket = socket;
socket.addEventListener('message', function (ev) {
term._getMessage = function (ev) {
term.write(ev.data);
});
};
term._sendData = function (data) {
socket.send(data);
};
socket.addEventListener('message', _getMessage);
if (bidirectional) {
this.on('data', function (data) {
socket.send(data);
});
this.on('data', _sendData);
}
socket.addEventListener('close', term.detach.bind(term, socket));
socket.addEventListener('error', term.detach.bind(term, socket));
};
Xterm.prototype.detach = function (socket) {
var term = this;
term.off('data', term._sendData);
socket.removeEventListener('message', term._getMessage);
delete term.socket;
};
});
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "xterm.js",
"version": "0.17",
"version": "0.20",
"ignore": ["demo", "docs", "test", ".gitignore"]
}
+2 -2
View File
@@ -51,9 +51,9 @@ copyright = u'2014, SourceLair Limited'
# built documents.
#
# The short X.Y version.
version = '0.17'
version = '0.20'
# The full version, including alpha/beta/rc tags.
release = '0.17 Alpha'
release = '0.20 Alpha'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
+1
View File
@@ -45,6 +45,7 @@
.xterm .terminal-cursor {
background-color: #fff;
color: #000;
}
.xterm .xterm-helpers {