ConstMAX_The maximum number of sessions.Session that will be included in a requested list.
ConstonFired when recently closed tabs and/or windows are changed. This event does not monitor synced sessions changes.
Forget a recently closed tab.
The windowId of the window to which the recently closed tab to be forgotten belongs.
The sessionId (closedId) of the recently closed tab to be forgotten.
Forget a recently closed window.
The sessionId (closedId) of the recently closed window to be forgotten.
Retrieve a value that was set for a given key on a given tab.
The id of the tab whose value is being retrieved from.
The key which corresponds to the value.
Retrieve a value that was set for a given key on a given window.
The id of the window whose value is being retrieved from.
The key which corresponds to the value.
Remove a key/value pair that was set on a given tab.
The id of the tab whose key/value pair is being removed.
The key which corresponds to the value.
Remove a key/value pair that was set on a given window.
The id of the window whose key/value pair is being removed.
The key which corresponds to the value.
Reopens a windows.Window or tabs.Tab, with an optional callback to run when the entry has been restored.
OptionalsessionId: string
The windows.Window.sessionId, or tabs.Tab.sessionId to restore. If this parameter is not specified, the most recently closed session is restored.
Set a key/value pair on a given tab.
The id of the tab that the key/value pair is being set on.
The key which corresponds to the value being set.
The value being set.
Set a key/value pair on a given window.
The id of the window that the key/value pair is being set on.
The key which corresponds to the value being set.
The value being set.
Use the
browser.sessionsAPI to query and restore tabs and windows from a browsing session.Permissions:
sessionsNot allowed in: Content scripts, Devtools pages