I'm writing a Firefox Add-On using the WebExtension API. Some of the APIs (such as browser.storage.sync
) require an Add-On ID to be explicitly declared in the add-on's manifest.json
file.
The documentation for IDs states:
The ID of the extension, which must be one of the following:
- GUID (Firefox 1.0)
- A string formatted like so: [email protected]
The latter format is significantly easier to generate and manipulate. Firefox 1.5 has checking to ensure that your id falls into one format or the other and will refuse to install add-ons that have malformed ids. You should not use a real email address for your id, however, as it might attract spam.
The documentation is not very clear with regards to what kind of string I can provide. Is it...
- Any valid email address?
- Any string that "looks like" [email protected]?
- How about [email protected]?
- Should it be relevant to the extension itself?
- Should it have a domain name I own or can it be any?
etc.
Because I must declare the ID explicitly to use browser.storage.sync
, I am unable to depend on the automatic ID that can be provided by Firefox for WebExtensions.
What are the conventions for explicitly declared add-on IDs in Firefox?
[email protected]
as for your questionAny valid email address?
- the documentation you quoted saysYou should not use a real email address for your id, however, as it might attract spam
- so, a valid email address format but don't use a real email address - the point of using your domain (in the example it's example.org) is that someone else is not likely to do so ... if you pick a random [email protected] ... what's to say that isn't already used by someone else? – Jaromanda X