It seems you're more defining a module system.

Personally, I don't like strings in code. Instead of

registry.getExtensions('firefox.home.tileCollections')

can't we do rather do:
api.firefox.home.tileCollections
?

Most importantly, however, please do NOT let me define all used APIs in a manifest. My extension is modularized, and even within a module, I keep things separated in files. I want to have everything related to a functionality in that one code file. This helps code comprehension, allows easy add/removal of features, and avoids merge conflicts. If every API ever used anywhere must all be in one file, this file is bound to have constant merge conflicts when merging branches.

The typical solution for that are imports at the top of the source code file. But IMHO, even that is annoying (conflicts at the top, changes not confined to function). Why not just quickly scan the source code for "api." and then load stuff? The JavaScript compiler has to load the ext code files at ext load time anyways, right? As soon as it tries to resolve api. , you resolve the extension point and you're at the same place as with your manifest file.

Ben

_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to