Ghostty-web exists and is even API compatible with xterm.js (same engine that powers Ghostty):
https://github.com/coder/ghostty-web/
In fact, it looks like wterm's 12KB plugin doesnt offer full term emulation and uses ghostty to support everything else: