WebExtension ContextMenus need Submenu icons

RESOLVED DUPLICATE of bug 1321544

Status

()

Toolkit
WebExtensions: General
--
enhancement
RESOLVED DUPLICATE of bug 1321544
2 months ago
2 months ago

People

(Reporter: ivan.bogdev, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

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

(Reporter)

Description

2 months ago
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

Comment 1

2 months ago
It is an enhancement.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Component: Untriaged → WebExtensions: General
Ever confirmed: true
Product: Firefox → Toolkit

Comment 2

2 months ago
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
Last Resolved: 2 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1321544
You need to log in before you can comment on or make changes to this bug.