Closed
Bug 1357651
Opened 9 years ago
Closed 9 years ago
contextMenus.create does not support CSS selector context
Categories
(WebExtensions :: Frontend, enhancement)
WebExtensions
Frontend
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1341804
People
(Reporter: fwang, Unassigned)
Details
The current contextMenus API does not seem to contain any way to create an item based on a CSS selector context. Only some specific cases like images, audio or iframes are supported [1].
The old addon-sdk API had a more powerful set of declarative context, including SelectorContext(selector) for that purpose: 'This context occurs when the menu is invoked on a node that either matches selector, a CSS selector, or has an ancestor that matches. selector may include multiple selectors separated by commas, e.g., "a[href], img".'. I would be nice to have something similar for WebExtensions.
[1] https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextMenus/create#Parameters
[2] https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/context-menu#Declarative_contexts
| Reporter | ||
Comment 1•9 years ago
|
||
More references:
- https://mail.mozilla.org/private/webextensions-support/2017-April/000029.html
- https://discourse.mozilla-community.org/t/porting-to-webextension-selector-on-browser-contextmenus/15061/2
- https://discourse.mozilla-community.org/t/interact-with-dom-node-via-a-contextmenu-entry/14387/3
Also, bug 1325814 may be related.
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Updated•8 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•