sessions API
The sessions API 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. Returns undefined if the key does not exist.
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
This may return undefined
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)