Closed Bug 1399196 Opened 7 years ago Closed 7 years ago

WebExtension ContextMenus need Submenu icons

Categories

(WebExtensions :: General, enhancement)

All
Other
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1321544

People

(Reporter: ivan.bogdev, Unassigned)

Details

(Whiteboard: [specification][type:bug])

What did you do?
================
While updating my WebExtention,  I was implementing contextMenus from https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/menus.

The contextMenu can be created with an icon (image). When multiple menus items are created, they get put into a submenu.



What happened?
==============
The main menu item gets an icon (the specified icon that comes from the manifest).

However, the submenu items cannot get icons. When specifying the icon property, the browser throws :
"Error: Type error for parameter createProperties (Unexpected property "icons") for contextMenus.create."


What should have happened?
==========================
The submenu should have the capability to support icons. 
When using the Firefox Developer version, the browser does not throw the error, and it supports submenu icons. However, in the normal firefox 55.0.3, it doesn't work.

Is there anything else we should know?
======================================
In the API, this is understood: 
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/menus

However, there is no reason not to add icons to submenus.

Submenu icons have the potential to make menus more visually attractive and easier to use.
Component: API → Untriaged
Product: Mozilla Developer Network → Firefox
It is an enhancement.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Component: Untriaged → WebExtensions: General
Ever confirmed: true
Product: Firefox → Toolkit
Added in bug 1321544, see the docs or https://github.com/andymckay/sort-tabs-by-url/blob/master/background.js#L50-L66 for an example.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.