Open zenhack opened 7 years ago
You'll probably want to trace through the implementation of SessionContext.offer(), which does something similar: it's a server-side call that invokes a client-side UI dialog. request() will be more complicated, though, since it has to return a result. Actually, this may prove problematic -- e.g. what happens if the session context gets disconnected while the user is making their choice? So I'm not entirely sure that this is the right API, though I'm also not sure what would be better.
Per grain.capnp:
I didn't see an issue open actually tracking this, so I'm opening one. The postMessage workflow is a bit obnoxious, especially in an app that doesn't otherwise use/need javascript and is written in a language that has good capnp support.
I might consider taking a whack at this if/when I find the time -- wouldn't mind pointers as to where to start, as I'm still unfamiliar with the codebase.