Extensible JavaScript terminal emulator