I wonder when webassembly will define some general purpose interface to tie into the DOM.
I understand that's on the roadmap, but not high priority.
Edit: No help with a prediction on when, but a bit of the "how": https://github.com/WebAssembly/design/blob/master/GC.md