Cannot inject content script on page refresh with activeTab permission
Categories
(WebExtensions :: Untriaged, defect)
Tracking
(Not tracked)
People
(Reporter: sharmalay, Unassigned)
Details
Attachments
(1 file)
820 bytes,
application/x-bzip
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
- Temporarily load the attached minimal extension source.
- Navigate to a page and activate extension through browser action.
- Refresh the page.
Actual results:
An error is logged to the background page console:
Error: Missing host permission for the tab
This error originates from the function
handleExtensionExecute()
in the file
toolkit/components/extensions/ExtensionContent.jsm
in the Firefox source.
Expected results:
The background page should be able to inject scripts into the tab based off of having the activeTab permission and previous activation of the extension by the user.
This test case works in the Chrome browser. Granting permission for extensions to call executeScript on page refresh reduces the need for extensions to ask for overly permissive host permissions to achieve this functionality.
Updated•6 years ago
|
Comment 1•6 years ago
|
||
The activeTab permission is lost on any navigation, including refresh. This is the expected behavior.
Description
•