Shows one or more tabs that were previously hidden by a call to tabs.hide
.
This is an asynchronous function that returns a Promise
.
Shows one or more tabs that were previously hidden by a call to tabs.hide
.
This is an asynchronous function that returns a Promise
.
let showing = browser.tabs.show(
tabIds // integer or integer array
)
tabIds
integer
or array
of integer
. The IDs of the tab or tabs to show.
A Promise
that will be fulfilled with no arguments. If any error occurs, the promise will be rejected with an error message.
Show a single tab:
function onShown() {
console.log(`Shown`);
}
function onError(error) {
console.log(`Error: ${error}`);
}
browser.tabs.show(2).then(onShown, onError);
Show multiple tabs:
function onShown() {
console.log(`Shown`);
}
function onError(error) {
console.log(`Error: ${error}`);
}
browser.tabs.show([15, 14, 1]).then(onShown, onError);
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
show |
No | No | 61 | ? | No | No | ? | ? | No | ? | No | ? |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/show