Navigate to the next page in tab's history, if available.
This is an asynchronous function that returns a
Promise
.
var goingForward = browser.tabs.goForward(
tabId
,
// optional integer
callback
// optional function
)
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.
A
Promise
that is fulfilled when the page navigation finishes.
BCD tables only load in the browser
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);
注意:
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.
最后修改: , 由 MDN 贡献者