sessions API
The sessions API first appeared in Thunderbird 115. It allows to add tab related session data to Thunderbird’s tabs, which will be restored on app restart.
Functions
getTabValue(tabId, key)
Retrieve a previously stored value for a given tab, given its key.
Parameters
tabId
(integer)
ID of the tab whose data you are trying to retrieve. Error is thrown if ID is invalid.
key
(string)
Key identifying the particular value to retrieve.
Return type (Promise)
string
removeTabValue(tabId, key)
Remove a key/value pair from a given tab.
Parameters
tabId
(integer)
ID of the tab whose data you are trying to remove. Error is thrown if ID is invalid.
key
(string)
Key identifying the particular value to remove.
setTabValue(tabId, key, value)
Store a key/value pair associated with a given tab.
Parameters
tabId
(integer)
ID of the tab with which you want to associate the data. Error is thrown if ID is invalid.
key
(string)
Key that you can later use to retrieve this particular data value.
value
(string)