You’re right, but it’s worth noting that nothing about that is particular to wasm. A JS app could equally avoid the DOM and render its own UI components via WebGL/WebGPU.
However, do make us to think we need another API for general JS without WebGL and GPU access.