[webkit-gtk] Rendering HTML from JavaScript

Robert Schroll rschroll at gmail.com
Fri Oct 31 18:05:10 PDT 2014

On Fri, Oct 31, 2014 at 7:24 PM, Anatoly Zaretsky 
<anatoly.zaretsky at gmail.com> wrote:
> MessageHandlers look very interesting — Is there a similar mechanism
> to post messages in the
> opposite direction from the UI process to listeners registered by the 
> JavaScript
> code? Or do I still need to use some IPC channel for that?

You can use run_javascript from the UI process to run arbitrary 
Javascript inside the web process.  It's pretty easy to roll your own 
messaging system on top of this, or you can just trigger the code you 
want directly.

For an example using run_javascript and the window title (rather than 
the new postMessage() method), see 
https://github.com/rschroll/webkitdom/tree/javascript.  Other branches 
show a solution with IPC over DBus and the old WebKitGtk code.


More information about the webkit-gtk mailing list