Syntax
js
let extensionVersion = await browser.runtime.getVersion()
Parameters
None.
Return value
A string containing the extension's version as declared in the manifest.
Note: The returned version may differ from the string in the file because the browser can parse and serialize it.
Examples
Get the extension version string:
js
const version = browser.runtime.getVersion();
console.log(version);
Browser compatibility
See also
- The
runtime.getManifest()method, which returns the entire manifest as an object. - Manifest
versionkey