Yes. Having a webserver in your game to serve XMLHTTPRequests?
No way. Look for websockets.
The feature you're trying to implement is extremely advanced and comes sure at a toll in terms of effort. Be sure to get a positive gain. I wouldn't do anything like this at engine level, maybe for the scripting system. Maybe.
Now to add structure to the engine (C++), and pretty up the browser portion, and I'm done. Then I just need to create requests and responses as I come up with them. Luckily all requests can be handled in C++, so that makes my life a lot easier to pack into the engine. I'm thinking in a couple weeks I can have functionality done, and I can work on form and style over time.