Path: blob/main/files/en-us/mozilla/add-ons/webextensions/api/tabs/goback/index.md
6563 views
------{{AddonSidebar()}}
Navigate to the previous page in tab's history, if available.
This is an asynchronous function that returns a Promise.
Syntax
Parameters
tabId{{optional_inline}}:
integer. The ID of the tab to navigate. Defaults to the active tab of the current window.
callback{{optional_inline}}:
function. When the page navigation finishes, this function is called without parameters.
Return value
A Promise that is fulfilled when the page navigation finishes.
Browser compatibility
{{Compat}}
Examples
Go back to the previous page in the current tab:
{{WebExtExamples}}
Note: This API is based on Chromium's
chrome.tabsAPI. This documentation is derived fromtabs.jsonin the Chromium code.