Can a Manifest v3 Firefox extension request the "Access your data for all websites"
permission from the user at runtime?
This option is usually managed in the firefox about:addons
built-in page:
Some features of my extension require this permission to work, and I want to prompt the user to grant it if it hasn't been granted yet.
The desired workflow is as follows:
When the user clicks a button to trigger a feature that requires this permission, the extension checks if it has the permission to access data for all websites.
If the permission has not been granted yet, the extension should request it from the user. If the permission has already been granted, the feature should be triggered.
I have tried using the browser.permissions
API, but I could not find a way to request this specific permission at runtime.
Is there any other way to request this permission from the user at runtime, or is it simply not possible?
Edit:
Not sure if this is the intended behavior, but sending a permission request with only "origins" and no "permission" key specified seems to work:
browser.permissions.request({origins: ['<all_urls>']})