Virtual DOM springs to mind. React/Vue.js/Ember all implement a lightweight fascimile of the DOM used to do support DOM diffing, which that could be ported to WASM. Here's an example of someone who has written one already: https://github.com/mbasso/asm-dom