js-ipfs runs in the browser just fine. See https://filemap.xyz/.
For a DHT to work, you need to be able to able to connect to be discoverable and be able to connect to multiple peers.
WebRTC unfortunately doesn't allow for this yet.
js-ipfs runs in the browser just fine. See https://filemap.xyz/.