Closed Bug 1357651 Opened 9 years ago Closed 9 years ago

contextMenus.create does not support CSS selector context

Categories

(WebExtensions :: Frontend, enhancement)

enhancement
Not set
normal

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
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.