Terminal like emulator in javascript