menus.create() for Extensions' own moz-extension pages
Categories
(WebExtensions :: Frontend, enhancement)
Tracking
(Not tracked)
People
(Reporter: erosman, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
It is useful to be able to add context-menu to extension's own privileged pages such as browserAction pop-up, PageAction pop-up, options page etc
At the moment, the only options are a catch-all menus.ContextType which affects all pages (including other extensions' pop-ups), or using the 'contextmenu' Web API.
Above can be achieved via 3 methods:
1- ContextType: a context that only applies to extension's own privileged pages
2- documentUrlPatterns: to match moz-extension://{extension-id}
3- targetUrlPatterns: Expand the matchable attributes (href/src) to include other possibilities
Comment 1•6 years ago
|
||
I'm assigning a component to get a start on this, if considered wrong, please feel free to change it to a more appropriate one.
Comment 2•6 years ago
|
||
Firefox 64 added several enhancements to the menus API that allows you to restrict menus to specific views (viewTypes). viewTypes / documentUrlPatterns should be sufficient to meet your needs.
For the announcement, see https://blog.mozilla.org/addons/2018/11/08/extensions-in-firefox-64/#cm
Description
•