How can GeckoView load a WebExtension for Android local pages?

I am using GeckoView on Android and loading local HTML pages via:

resource://android/assets/...

I want to inject a WebExtension (content script) into these local pages so that Java ↔ JavaScript communication can be implemented using the WebExtension messaging APIs.

However, I found that:

  • content_scripts are not injected into pages loaded from resource://android/assets/*

  • Even when using:

    • <all_urls>
  • The content script still never runs on resource:// pages

1 Like