<div dir="ltr">Hello,<div><br></div><div>I am using GTK 3.12 and GTK WebKit 2 and I have a g_signal_callback that I want to change the HTML content of the web view on click basically.</div><div><br></div><div>So I have a</div>
<div><br></div><div><div>struct data {</div><div>    WebKitWebView *web_view;</div><div>};</div></div><div><br></div><div>And I start the webview and add it too my window</div><div><br></div><div>data.web_view = (WebKitWebView *) webkit_web_view_new();<br>
</div><div>GtkWidget *web_window = gtk_scrolled_window_new(NULL, NULL);<br></div><div><div>gtk_container_add(GTK_CONTAINER(web_window), GTK_WIDGET(notes.web_view));</div></div><div><br></div><div>And then I have a signal</div>
<div><br></div><div>g_signal_connect(blah, &quot;blah&quot;, G_CALLBACK(function), &amp;data);<br></div><div><br></div><div>And a function</div><div><br></div><div>void function(struct data *blah) {</div><div>    webkit_web_view_load_html(blah-&gt;web_view, html, NULL);</div>
<div>}</div><div><br></div><div>And everything but the callback works, when I press the button I get</div><div><br></div><div>** CRITICAL **: void webkit_web_view_load_html(WebKitWebView*, const gchar*, const gchar*): assertion &#39;WEBKIT_IS_WEB_VIEW(webView)&#39; failed<br>
</div><div><br></div><div>But the passed in value is the webview, I&#39;ve also tried not using a struct and it still isn&#39;t working.</div><div><br></div><div>Any ideas on what could be wrong? Do I need to wait for it too load or do something else? I see the HTML (it&#39;s only &lt;h1&gt;Hello&lt;/h1&gt; so it shouldn&#39;t take long) before I press the button.</div>
</div>