File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 5353 term . writeln ( "Welcome to pyxterm.js!" ) ;
5454 term . writeln ( "https://github.com/cs01/pyxterm.js" ) ;
5555 term . onData ( ( data ) => {
56- console . log ( "pressed key " , data . input ) ;
57- socket . emit ( "pty-input" , { input : data . input } ) ;
56+ console . log ( "new input data " , data ) ;
57+ socket . emit ( "pty-input" , { input : data } ) ;
5858 } ) ;
5959
6060 const socket = io . connect ( "/pty" ) ;
6161 const status = document . getElementById ( "status" ) ;
6262
6363 socket . on ( "pty-output" , function ( data ) {
64- console . log ( "new output" , data ) ;
64+ console . log ( "new output received from server " , data ) ;
6565 term . write ( data . output ) ;
6666 } ) ;
6767
7878
7979 function fitToscreen ( ) {
8080 fit . fit ( ) ;
81- socket . emit ( "resize" , { cols : term . cols , rows : term . rows } ) ;
81+ const dims = { cols : term . cols , rows : term . rows } ;
82+ console . log ( "sending new dimensions to server's pty" , dims ) ;
83+ socket . emit ( "resize" , dims ) ;
8284 }
8385
8486 function debounce ( func , wait_ms ) {
You can’t perform that action at this time.
0 commit comments