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.

runtime.getBrowserInfo()

Returns information about the browser in which this add-on is installed.

Syntax

chrome.runtime.getBrowserInfo(
  function(browserInfo) {...} // function
)

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

Parameters

callback
function. The function is passed the following arguments:
browserInfo
An object with the following properties:
  • name: string value representing the browser name, for example "Firefox".
  • vendor: string value representing the browser's vendor, for example "Mozilla".
  • version: string representing the browser's version, for example "51.0" or "51.0a2".
  • buildID: string representing the specific build of the browser, for example "20161018004015".

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
Basic support No No 51.0 51.0 No

Examples

Get and log the browser's name:

function gotBrowserInfo(info) {
  console.log(info.name);
}

chrome.runtime.getBrowserInfo(gotBrowserInfo);

Acknowledgements

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: wbamberg
 Last updated by: wbamberg,