For games like TMJ, the game code is pretty much executed on the client-side. So as long as one has the game code in Javascript, then that is what would be needed to be in place to run the game.
You may want to take a look at the DS Opera SDK which provides some elements and examples that help in making apps for the DSi.