Couldn't you implement something like HTMX in wasm then and still have locality-of-behavior by specifying the behavior as html attributes?