CLIte/clite/libterm.js

26 lines
485 B
JavaScript

clite.libs.data = function() {
clite.libs.load('libterm','term',function(io,env) {
return Object.create({
// clears the terminal
clear:function() {
clite.term.clear();
},
ttyctrl:function(fn,v) {
return clite.term.ttyctrl(fn,v);
},
// gets an empty element with key events (allows view/less to display content in a clean element)
opentty:function() {
return clite.term.api.opentty();
},
closetty:function(tty) {
return clite.term.api.closetty(tty);
}
});
});
}