There’s a different answer depending on whether you’re talking about javascript in browser/app land, or javascript on a server (e.g., node.js). The reason is that browser-based javascript doesn’t support raw UDP sockets, and today, interacting with the ledger requires code to support RAET, which cannot be done without some low-level networking pieces. The high-level ajax-style http request isn’t enough.
If you’re talking node.js, then today it is theoretically possible, but far harder than it should be.
We are actively investigating how to replace the protocol that one uses to talk to the ledger. Conversations are quite intense, and they are motivated by the very sort of question you’ve asked–it needs to be possible to talk to sovrin in any reasonable programming language. Straight https is an obvious choice, but it has some problems with certificates introducing a flawed trust model into sovrin, and making sovrin dependent on CAs. We’ve looked at many other alternatives and want to open the discussion to the larger community as soon as we have a rational summary of the choices to offer.
I believe within a very short time we’ll have a more satisfying answer to this question.