Closed Bug 1503421 Opened Last year Closed 10 months ago

Context menus WebExtensions API

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement)

enhancement
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 66.0

People

(Reporter: darktrojan, Assigned: darktrojan)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

This should be the same as the Firefox API but with different "contexts", and different arguments passed to listeners.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/menus
Assignee: nobody → geoff
Status: NEW → ASSIGNED
Attachment #9032849 - Flags: review?(philipp)
If it makes life any easier, here's the changes I made to the files I copied over from mozilla-central.
Comment on attachment 9032850 [details] [diff] [review]
1503421-mc-diff-1.diff

Review of attachment 9032850 [details] [diff] [review]:
-----------------------------------------------------------------

Yes, this makes it a lot easier. r=philipp with the following question:

::: browser/components/extensions/child/ext-menus.js
@@ -257,5 @@
>        },
>      };
> -
> -    const result = {};
> -    if (context.extension.hasPermission("menus")) {

What happened to the permission checking?
Attachment #9032849 - Flags: review?(philipp) → review+
In Firefox there's also the contextMenus permission which allows for some things but not others, which is why there's permission checking in various places. I didn't implement the contextMenus permission – the whole thing requires the menus permission.
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/04e98cdf2061
Context menus WebExtensions API; r=Fallen
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 66.0

Is there any possibility that this will eventually include adding menu items to the main menu rather than the context menu?
Looks good.:)

You need to log in before you can comment on or make changes to this bug.