There have been some discussions about similar stuff before, I'm sure you can find it. In general, the most likely way of getting D in browsers is by using emscripten - take a look here for a proof of concept http://d.hatena.ne.jp/ABA/20130331