update files

This commit is contained in:
nuintun 2015-11-26 23:05:52 +08:00
parent 7d8eb15a78
commit ff5529a1ab
2 changed files with 9 additions and 1 deletions

View File

@ -66,7 +66,7 @@ function createXTerm(name, xtermNode){
fgColor: 'inherit',
bgColor: 'transparent',
onscreen: function (screen){
if (Terminal.focus === this) {
if (this.isFocused()) {
clearTimeout(timer);
timer = setTimeout(function (){

View File

@ -7,6 +7,14 @@
module.exports = function (Terminal){
Terminal.focus = null;
/**
* isFocused
* @returns {boolean}
*/
Terminal.prototype.isFocused = function (){
return Terminal.focus === this;
};
/**
* focus
*/