mirror of
https://github.com/nuintun/command-manager.git
synced 2025-12-18 17:04:23 +08:00
update files
This commit is contained in:
26
static/js/terminal/lib/close.js
Normal file
26
static/js/terminal/lib/close.js
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Created by nuintun on 2015/11/24.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function (Terminal){
|
||||
Terminal.prototype.close = function (){
|
||||
this.lines = [];
|
||||
this.children = [];
|
||||
this.readable = false;
|
||||
this.writable = false;
|
||||
this.handler = function (){};
|
||||
this.write = function (){};
|
||||
|
||||
if (this.element) {
|
||||
var parent = this.element.parentNode;
|
||||
|
||||
if (parent) {
|
||||
parent.removeChild(this.element);
|
||||
}
|
||||
|
||||
this.element = null;
|
||||
}
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user