Bug 180532 - Add api to load a WebKitWebExtension from a file instead of specifying directory.
Summary: Add api to load a WebKitWebExtension from a file instead of specifying direct...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-07 09:47 PST by Leo Ufimtsev
Modified: 2017-12-07 09:47 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Ufimtsev 2017-12-07 09:47:06 PST
Currently, the only way to add a webextension is to specify a directory:
webkit_web_context_set_web_extensions_directory ()

This is a request for api such that you could specify one or multiple paths directly to a extension(s) to load.

Use cases:
1) When packaging webkitgtk with java/jni (namely eclipse), packaging a separate folder is complicated. 
   The machinery (e.g maven/jar/OSGI) is typically designed to find/extract (and optionally load) specific .so files, not a folder containing just extension(s).
   (In our case we had to spend a lot of time implementing/modifying the build system to handle webkitgtk's 'extensions in a directory' approach.

2) Ability to load only selected extensions at run time without moving '.so' files around.

This is not an urgent request as we now have the mechanism working via directory, but it would be nice to see the ability to specify .so directly in the future.

(Relevant Eclipse/SWT upstream bug:
528287 – [Webkit2] Request webkitgtk developers for feature to load extension '.so' instead of specifying a directory. 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=528287
If you could update that bug when/(if) this feature is complete, then that'd be great)