Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

tabs.getZoomSettings()

Gets the current zoom settings for a specified tab.

Syntax

chrome.tabs.getZoomSettings(
  tabId,                       // optional integer
  function(zoomSettings) {...} // function
)

This API is also available as browser.tabs.getZoomSettings() in a version that returns a promise.

Parameters

tabIdOptional
integer. The ID of the tab to get the current zoom settings from. Defaults to the active tab of the current window.
callback
function. Called with the tab's current zoom settings.The function is passed the following arguments:
zoomSettings
tabs.ZoomSettings. The tab's current zoom settings.

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
Basic support Yes No 45.0 No 33

Examples

Get the zoom settings for the current tab:

function onGot(settings) {
  console.log(settings);
}

chrome.tabs.getZoomSettings(onGot);

Acknowledgements

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

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

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