tabs.goForward()
Navigate to the next page in tab's history, if available.
Navigate to the next page in tab's history, if available.
This is an asynchronous function that returns a Promise.
Syntax
let goingForward = browser.tabs.goForward(
tabId, // optional integer
callback // optional function
)
Parameters
tabId- :
integer. The ID of the tab to navigate. Defaults to the active tab of the current window. callback- :
function. When the page navigation finishes, this function is called without parameters.
Return value
A Promise that is fulfilled when the page navigation finishes.
Examples
Go forward to the next page in the current tab:
function onGoForward() {
console.log("Gone forward");
}
function onError(error) {
console.log(`Error: ${error}`);
}
let goingForward = browser.tabs.goForward();
goingForward.then(onGoForward, onError);
Browser compatibility
[!NOTE] This API is based on Chromium's
chrome.tabsAPI. This documentation is derived fromtabs.jsonin the Chromium code.