build terminal window completely with JS