I work on a developer tools extension (https://addons.mozilla.org/en-US/firefox/addon/odd-devtools/) that requires host permissions to allow it to inject a content script used for communicating between a page and the extension.
I would like to prompt the user for host permissions at install time, but I can see from other posts (for example How to ask user to grant permissions for 'Access your data for all websites' through a prompt during the installation process) that this is not currently possible.
As an alternative, I have been attempting to request the permissions at runtime as recommended in https://blog.mozilla.org/addons/2022/11/17/unified-extensions-button-and-how-to-handle-permissions-in-manifest-v3/.
When I attempt to use the permissions API in a devtools or panel script,
undefined. Is there a way to request permissions from these contexts? My extension also uses a background script and content scripts, but no user facing UI outside of the devtools panel.