[webkit-gtk] Silently failing to load web extensions
Adrian Perez de Castro
aperez at igalia.com
Thu Jan 17 08:01:51 PST 2019
On Thu, 17 Jan 2019 09:25:41 -0600, Michael Catanzaro <mcatanzaro at igalia.com> wrote:
> On Wed, Jan 16, 2019 at 6:38 PM, Michael Gratton <mike at vee.net> wrote:
> > Hey all,
> > It looks like people who install Geary from source to /usr/local
> > (more common now that meson defaults to that as the install prefix)
> > are finding their web extensions not being loaded under Fedora for...
> > reasons.
> > It would be good to have a more deterministic API for loading
> > extensions, so applications can determine when loading one has failed
> > and report an error, something like
> > "webkit_web_context_load_web_extension_async(const gchar *dir, const
> > gchar *name, ...)". Is this likely to be possible to implement?
> Um... what are "reasons"? If Geary calls
> webkit_web_context_set_web_extensions_directory() with the correct
> directory then web extensions under /usr/local should work just fine.
I can vouch for this; it worked fine any time I needed to load extensions.
Note that you have to make sure that it is invoked as early as possible before
any web view is created. If you doubt about where to call it, my advice is to
use a callback for the WebKitWebContext::initialize-web-extensions signal
(which is also what the documentation recommends).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 195 bytes
Desc: not available
More information about the webkit-gtk