tabs.getZoom()

Gets the current zoom factor of a specified tab.

Syntax

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

Parameters

tabIdOptional
integer. The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
callback
function. Called with the tab's current zoom factor after it has been fetched.The function is passed the following arguments:
zoomFactor
number. The tab's current zoom factor.

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,