* Write data to terminal * @param {string} data - Data to write
(data)
| 900 | * @param {string} data - Data to write |
| 901 | */ |
| 902 | write(data) { |
| 903 | if ( |
| 904 | this.serverMode && |
| 905 | this.isConnected && |
| 906 | this.websocket && |
| 907 | this.websocket.readyState === WebSocket.OPEN |
| 908 | ) { |
| 909 | // Send data through WebSocket instead of direct write |
| 910 | this.websocket.send(data); |
| 911 | } else { |
| 912 | // For local mode or disconnected terminals, write directly |
| 913 | this.terminal.write(data); |
| 914 | } |
| 915 | } |
| 916 | |
| 917 | /** |
| 918 | * Write line to terminal |
no test coverage detected