Fabrice Bellard built an x86 PC emulator using JavaScript. He’s even gone so far as to install Linux kernal 2.6.20 on top of it. “Thee code is written in pure Javascript using Typed Arrays which are available in recent browsersm,” Bellard wrote. It works in Firefox and Chrome 11, but not not Chrome 12.
As for the Linux instance, Bellard wrote: “The disk image is just a ram disk image loaded at boot time. It contains a filesystem generated with Buildroot containing BusyBox. I added my toy C compiler TinyCC and my unfinished but usable emacs clone QEmacs.” You can see Linux running JavaScript here.