Need help with emscripten port

Beautiful! Thanks for tackling this.