Group Group Group Group Group Group Group Group Group

Any example of creating a WebExtensionController instance to be used with latest GeckView (>=v73)

Release notes for GeckoView v73 state the following:

⚠️ WebExtension’s constructor now requires a WebExtensionController instance.

But I cannot find any example how to do that. Your help is highly appreciated.

Any help on the topic. I simply cannot find any information on this.

@acrolink Do you still have issues with this?

1 Like

The solution is do something like this:

WebExtension extension = new WebExtension("resource://android/assets/messaging/", runtime.getWebExtensionController());

Added WebExtensionController.installBuiltIn that allows installing an extension that is bundled with the APK. This method is meant as a replacement for GeckoRuntime.registerWebExtension, :warning: which is now deprecated and will be removed in GeckoView 81.
Added CookieBehavior.ACCEPT_FIRST_PARTY_AND_ISOLATE_OTHERS to allow enabling dynamic first party isolation; this will block tracking cookies and isolate all other third party cookies by keying them based on the first party from which they are accessed.
Added cookieStoreId field to WebExtension.CreateTabDetails. This adds the optional ability to create a tab with a given cookie store ID for its contextual identity. (bug 1622500)
Added NavigationDelegate.onSubframeLoadRequest to allow intercepting non-top-level navigations.

1 Like