MicroPython has a javascript port that uses Emscripten:
https://github.com/micropython/micropython/tree/master/ports...
But it doesn't provide much more than the basic REPL.
You could also try MicroPython on Unicorn, where more of the hardware is simulated in the browser:
http://micropython.org/unicorn/ https://github.com/micropython/micropython-unicorn
The Unicron-MicroPython kernel is quite old but it's still useful for getting a feel for what's possible.