-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Labels
implemented: chromeImplemented in ChromeImplemented in Chromeimplemented: safariImplemented in SafariImplemented in Safarisupportive: firefoxSupportive from FirefoxSupportive from Firefox
Description
We should add a new method to get the installed version of an extension:
getVersion(): string
Today, there is significant usage of runtime.getManifest().version as an analogue to this.
By adding a new method:
- In the short term, this simplifies getting this data, and makes it easier to see usage in static analysis.
- Longer term, this may reduce usage of getManifest() and allow us to deprecate it or limit availability to certain contexts. This is desirable as the behavior is poorly defined - see Inconsistency: runtime.getManifest() and missing keys #400.
Availability:
Trusted extension contexts and content scripts.
This matches getManifest() since there is significant usage in both contexts.
This API is still synchronous to encourage adoption as an alternative to the synchronous getManifest().
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
implemented: chromeImplemented in ChromeImplemented in Chromeimplemented: safariImplemented in SafariImplemented in Safarisupportive: firefoxSupportive from FirefoxSupportive from Firefox