runtime.getVersion()
Returns the extension's version as declared by developer in the version manifest key.
Syntax
js
browser.runtime.getVersion()
Parameters
None.
Return value
A string containing the extension's version as declared in the manifest.
Examples
Get the extension version string:
js
const version = browser.runtime.getVersion();
console.log(version);
Browser compatibility
See also
runtime.getManifest()method which returns representation of the entire manifest- Manifest
versionkey