Discussion:
[webkit-help] Can webextension be loaded directly instead of specifying a directory?
Leo Ufimtsev
2017-11-22 15:17:47 UTC
Permalink
Hello,

The current api to load a webextension is to point it to a folder with
extensions:

.. webkit_web_context_set_web_extensions_directory(..)
.. webkit_web_context_set_web_extensions_initialization_user_data (..)

Is there a way to specify the exact .so file instead of specifying a
directory?
(e.g load the module manually?).

We package webkitgtk into a jar and interact with it via JNI. Extracting
'.so' files and dealing with a separate directory is a bit complicated in
that context, it would be preferred to point to specific .so file.

Thank you.

[1]
https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebContext.html#webkit-web-context-set-web-extensions-directory
--
Leo Ufimtsev, Software Engineer, Red Hat
Leo Ufimtsev
2017-11-22 15:56:35 UTC
Permalink
Followup:

After discussion with Konstantin, (IRC anullen), based on
WebKitExtensionManager.cpp, it seems that there is no direct way of doing
it. (Webprocess has to load GModule, not main process).
This functionality would have to be added or hacked onto webkit2gtk.

Thank you.
Post by Leo Ufimtsev
Hello,
The current api to load a webextension is to point it to a folder with
.. webkit_web_context_set_web_extensions_directory(..)
.. webkit_web_context_set_web_extensions_initialization_user_data (..)
Is there a way to specify the exact .so file instead of specifying a
directory?
(e.g load the module manually?).
We package webkitgtk into a jar and interact with it via JNI. Extracting
'.so' files and dealing with a separate directory is a bit complicated in
that context, it would be preferred to point to specific .so file.
Thank you.
[1] https://webkitgtk.org/reference/webkit2gtk/stable/
WebKitWebContext.html#webkit-web-context-set-web-extensions-directory
--
Leo Ufimtsev, Software Engineer, Red Hat
--
Leo Ufimtsev, Software Engineer, Red Hat
Loading...