Type | String |
---|---|
Mandatory | Yes |
Example | "version": "0.1" |
Version of the extension, formatted as numbers and ASCII characters separated by dots. For the details of the version format, see the Version format page.
You can inspect the add-ons linter code to see how extension versions for Firefox are validated.
Note that the syntax defined for Chrome's version
is more restrictive than that used by Firefox:
version
that are valid for Chrome will always be valid for Firefoxversion
that are valid for Firefox may not be valid for ChromeTo obtain your extension version in your JavaScript code, use:
console.log(browser.runtime.getManifest().version);
If the manifest contains:
"version": "0.1"
To obtain your extension version in your JavaScript code, use:
console.log(browser.runtime.getManifest().version); // expected output: "0.1"
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
version |
Yes
Valid Chrome versions are a subset of valid Firefox versions.
|
14 |
48 |
? |
Yes |
14 |
? |
? |
48 |
? |
? |
? |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/version