Gottox / terminal.js

Javascript terminal emulator library that aims to be xterm compliant and is supposed to work in browsers and node.js.
http://terminal.js.org
MIT License
592 stars 69 forks source link

Expose input and output #108

Closed wmaciel closed 8 years ago

wmaciel commented 8 years ago

Currently, the doms are edited during the construction of the DomInput and DomOutput objects with no regard to whether or not they have already been initialized.

For this reason, while working with the library I felt the need to have access to these objects in order to implement reconnection mechanisms.

This change will allow the unpiping and repiping of the doms directly.

Gottox commented 8 years ago

Sorry for the long delay.

The .dom() function is a quick and dirty way to bind a terminal to a dom element. For clarity, I would leave it as it is.

Nevertheless, DomInput and DomOutput are exported to the user. You may access it with Terminal.input.DomInput and Terminal.output.DomOutput and instanciate them directly.

The API is a bit clumsy at the moment, but there are plans to improve the situation.

wmaciel commented 8 years ago

Oh, I did not realize I had access to DomInput. My bad. Thanks for the tip.