runtime.getBrowserInfo()

Returns information about the browser in which the extension is installed.

This is an asynchronous function that returns a Promise.

Syntax

js
let gettingInfo = browser.runtime.getBrowserInfo()

Parameters

None.

Return value

A Promise that will be fulfilled with an object which has 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".

Examples

Get and log the browser's name:

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

let gettingInfo = browser.runtime.getBrowserInfo();
gettingInfo.then(gotBrowserInfo);

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
getBrowserInfo
Chrome – No support
Chrome
footnote No support
Edge – No support
Edge
footnote No support
Firefox – Full support
Firefox 51 (Release date: 2017-01-24)
footnote Full support
Opera – No support
Opera
footnote No support
Safari – No support
Safari
footnote
footnote See bug 294455
Firefox for Android – Full support
Firefox for Android 51 (Release date: 2017-01-24)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 294455

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.