Closed Bug 1627570 Opened 4 months ago Closed 4 months ago

API events should provide a tab object, not just the ID

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 76.0

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(1 file)

We have a few API events that provide a tab ID as the first argument to listeners. For consistency's sake, we should provide the whole tab object, as this is what happens in the APIs we share with browsers, and since bug 1617514, some of ours.

The affected events are mailTabs.onDisplayedFolderChanged, mailTabs.onSelectedMessagesChanged and messageDisplay.onMessageDisplayed. The first two of these don't even have the arguments listed in the schema, which is how I discovered this problem.

Attachment #9138419 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9138419 [details] [diff] [review]
1627570-events-tab-1.diff

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

Looks good, r=mkmelin
Attachment #9138419 - Flags: review?(mkmelin+mozilla) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/fa5c346560d7
Give tab info (instead of just tab ID) to API events. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 76.0
You need to log in before you can comment on or make changes to this bug.