tabs.setZoom()

Zooms a specified tab.

Syntax

browser.tabs.setZoom(
  tabId,           // optional integer
  zoomFactor,      // number
  function() {...} // optional function
)

Parameters

tabIdOptional
integer. The ID of the tab to zoom; defaults to the active tab of the current window.
zoomFactor
number. The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
callbackOptional
function. Called after the zoom factor has been changed.

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?45.0Yes33
Firefox
Basic supportNo

Examples

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,