Get Favicon for WebView in WebKitGtk

I’m trying to get the favicon property from a class based on WebKit.WebView from Vala in webkit2gtk4 however the favicon property doesn’t seem to update when loading a webpage. I have a test signal handler like this that never runs:

this.notify["favicon"].connect ((s, p) => {
   GLib.print ("%s\n", p.name);
});

If I change the property to title, it does print the property name. What am I missing?

Hi, you need to call webkit_web_context_set_favicon_database_directory() (webkit2gtk-4.0/4.1 API versions) or webkit_website_data_manager_set_favicons_enabled() (webkitgtk-6.0 API version) to enable favicons.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.