mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-23 12:14:20 +01:00
expose term instance to window for programatic use cases (#131)
* expose term to window for programatic use cases * add a brief introduction about the exposed window.term variable
This commit is contained in:
committed by
Shuanglei Tao
parent
1f6a6c7b78
commit
a428a7a430
@@ -247,7 +247,9 @@ var openWs = function() {
|
||||
term.destroy();
|
||||
}
|
||||
|
||||
term = new Terminal({
|
||||
// expose term handle for some programatic cases
|
||||
// which need to get the content of the terminal
|
||||
term = window.term = new Terminal({
|
||||
fontSize: 13,
|
||||
fontFamily: '"Menlo for Powerline", Menlo, Consolas, "Liberation Mono", Courier, monospace',
|
||||
theme: {
|
||||
|
||||
Reference in New Issue
Block a user