This is a demo of xterm.js and webpack with dash-wasm in the browser.
Everything is very similar to the terminal package. See that.
You can try this live at https://cowasm.sh or
git clone https://github.com/sagemathinc/cowasm cd cowasm/packages/cowasm.sh npm install npm run serve