Hides one or more tabs.
Hidden tabs are no longer visible in the browser's tabstrip. Hidden tabs are not automatically discarded: the code running in them continues to run. You can explicitly discard tabs whenever you hide them: although this is not appropriate in all situations, it will help to reduce the resources used by the browser.
This is an asynchronous function that returns a Promise
.
Not all tabs are eligible for being hidden:
- Tabs that are pinned cannot be hidden.
- Tabs that are sharing the screen, microphone or camera cannot be hidden.
- The current active tab cannot be hidden.
- Tabs that are in the process of being closed cannot be hidden.
The first time an extension hides a tab, the browser will tell the user that the tab is being hidden, show them how they can access the hidden tab, and give them the option of disabling the extension instead.
To use this API you must have the "tabHide" permission.