tabs.remove()

Closes one or more tabs.

Syntax

browser.tabs.remove(
  tabIds,          // integer or integer array
  function() {...} // optional function
)

Parameters

tabIds
integer or array of integer. The tab or list of tabs to close.
callbackOptional
function.

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?45.0Yes33
Firefox
Basic supportNo

Examples

Example add-ons

Acknowledgements

This API is based on Chromium's chrome.tabs API. This documentation is derived from tabs.json in the Chromium code.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,