How to do two-way "web desktop" browser-game communication/interaction?

I can’t find help for this any where, it seems there is nothing in the documentation.

I need to be able to call functions inside the “web desktop” Application from the browser and vice-versa. How to do this?

So, actually I haven’t tested this and so I’m not marking this as the solution, but it seems I can call browser code directly from the scripts. That’s a big ups.