<div dir="ltr">Hello!<br><br>I am migrating a WebKit1-based application to the WebKit2 API. The application<br>used the WebKitWebView&#39;s &quot;window-object-cleared&quot; signal and the JavaScriptCore<br>C API to extend the window object with the function<br><br>    void renderHTML(String content, String baseURI, Callback contentRendered)<br><br>When called the function would:<br>- create a new WebKitWebView;<br>- place it inside a newly created GtkOffscreenWindow;<br>- load the supplied content with webkit_web_view_load_string;<br>- subscribe to the view&#39;s &quot;notify::load-status&quot; signal;<br>- get the pixbuf from the GtkOffscreenWindow on WEBKIT_LOAD_FINISHED;<br>- finally, invoke the contentRendered callback passing it the contents<br>of the extracted pixbuf (particular pixbuf representation used is not<br>of interest here).<br><br>Is it possible to do the same with WebKit2? In particular can a web<br>process extension use webkit_web_view_new/webkit_web_view_load_html?<br>The reference manual does not explicitly forbid doing so, though including<br>both &lt;webkit2/webkit2.h&gt; and &lt;webkit2/webkit-web-extension.h&gt; in the<br>same source forces compilation error.<br><br>Also, are there other ways to programmatically convert some arbitrary<br>html text into an image?<br><br>--<br>Tolik</div>