Hi all,
i try to understand this webextension example (line 2):
browser.browserAction.disable();
browser.mailTabs.onSelectedMessagesChanged.addListener(async (tab, messageList) => {
let messageCount = messageList.messages.length;
if (messageCount == 1) {
browser.browserAction.enable(tab.id);
} else {
browser.browserAction.disable(tab.id);
}
});
browser.menus.create({
id: "sender",
title: "Sender",
contexts: ["message_list"],
async onclick(info) {
let message = info.selectedMessages.messages[0];
await browser.mailTabs.setQuickFilter({
text: {
text: message.author,
This file has been truncated. show original
After reading the documentation:
https://thunderbird-webextensions.readthedocs.io/en/68/mailTabs.html#onselectedmessageschanged
I still have no clue, why (tab, messageList) is the correct argument for the event listener? Where can I get this kind of information? What did I miss to read?
Regards, Michael