Interact with the browser's tab system.

You can use this API to get a list of opened tabs, filtered by various criteria, and to open, update, move, reload, and remove tabs. You can't directly access the content hosted by tabs using this API, but you can insert JavaScript and CSS into tabs using the tabs.executeScript() or tabs.insertCSS() APIs.

You can use most of this API without any special permission. However:

Alternatively, you can get these permissions temporarily, only for the currently active tab and only in response to an explicit user action, by asking for the "activeTab" permission.

Many tab operations use a Tab ID. Tab IDs are guaranteed to be unique to a single tab only within a browser session. If the browser is restarted, then it can and will reuse tab IDs. To associate information with a tab across browser restarts, use sessions.setTabValue().

Document Tags and Contributors

 Last updated by: wbamberg,