JSMESS is an attempt to port MESS / MAME to JavaScript using Emscripten.
Jason Scott says it best:
The MESS program can emulate (or begin to emulate) a majority of home computers, and continues to be improved frequently. By porting this program into the standardized and cross-platform Javascript language, it will be possible to turn computer history and experience into the same embeddable object as movies, documents, and audio enjoy.
Jason Scott's JSMESS site has demos for most working systems now. Our "1.0" release has been tagged as JSMESS 0.142, and we are actively working on a new version.
To build JSMESS 0.142, start with How to build and test JSMESS 0.142.