tabs.goForward()
Navigate to the next page in tab's history, if available.
This is an asynchronous function that returns a Promise
.
Syntax
var goingForward = browser.tabs.goForward(
tabId, // optional integer
callback // optional function
)
Parameters
Return value
A Promise
that is fulfilled when the page navigation finishes.
Browser compatibility
Report problems with this compatibility data on GitHubwebextensions-desktop | webextensions-mobile | |||||
---|---|---|---|---|---|---|
goForward | ChromeFull support72 | EdgeFull support79 | FirefoxFull support77 | OperaFull support60 | SafariFull support14 | Firefox for AndroidFull support79 |
Legend
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Examples
Go forward to the next page in the current tab:
function onGoForward() {
console.log("Gone forward");
}
function onError(error) {
console.log(`Error: ${error}`);
}
var goingForward = browser.tabs.goForward();
goingForward.then(onGoForward, onError);
Acknowledgments
This API is based on Chromium's chrome.tabs
API. This documentation is derived from tabs.json
in the Chromium code.
Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.