sessions API
The sessions API allows to add tab related session data to Thunderbird’s tabs, which will be restored on app restart.
Thunderbird’s sessions API is similar to the Firefox sessions API, but it doesn’t support accessing or restoring closed tabs.
Note
The Sessions API currently does not require the
permission, but it will soon. It’s recommended to request this permission before it becomes mandatory, to ensure your add-on continues to function properly.Functions
getTabValue(tabId, key)
– [Added in TB 115]
Retrieve a previously stored value for a given tab, given its key. Returns undefined if the requested key does not exist for the given tabId.
Parameters
tabId
ID of the tab whose data you are trying to retrieve. Error is thrown if ID is invalid.
key
Key identifying the particular value to retrieve.
removeTabValue(tabId, key)
– [Added in TB 115]
Remove a key/value pair from a given tab.
setTabValue(tabId, key, value)
– [Added in TB 115]
Store a key/value pair associated with a given tab.