There was a bit of trouble initially as I couldn’t obtain an nsIWebBrowser pointer from gtk_moz_embed_get_nsIWebBrowser. This turned out to be because the Gecko# WebControl hadn’t been shown yet (i.e. window.ShowAll()), but I didn’t figure this out as other functions like gtk_moz_embed_get_location worked fine.
Here’s Blagovest Dachev’s XUL GUI demo hosted in my container, with a simple C#->JS call demonstration. For anyone who hasn’t seen the Mono Summer of Code page, Blago’s working on the Mozilla half of this project.
However, splitting the call in two parts like this could have consequences; there’s no telling what multithreading could do to concurrency. I guess some kind of unique identifier is in order.
I also need to finish all of the error and exception handling at some point, though it seems robust enough at the moment.