Help accessing the console-message signal under Gtk3-Webkit2



Hi,

I am porting a script from Gtk3::WebKit to Gtk3::WebKit2 running on
Debian buster. It almost works except for intercepting the console
messages generated by the script and the opened webpage.


I have a call to connect to the console-message signal.
This works for Gtk3::WebKit::WebView

    $view->signal_connect('console-message' => sub { ... });

But porting the code to use Gtk3::WebKit2, I get the error message:

 GLib-GObject-WARNING **: ../../../gobject/gsignal.c:2424: signal
'console-message' is invalid for instance '0x55b7e2afc7f0' of type
'WebKitWebView'

Looking at the Webkit2 API it appears the console message signal is now
called 'console-message-send' but is now also on a WebKitWebPage object
that is also a WebKitExtension...

How do I intercept console messages using Gtk3::WebKit2?

Thanks very much!
Andrew



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]