Labs/Jetpack/JEP/25
Jump to navigation
Jump to search
Chrome Boosters are third-party modules that can be used to provide functionality to Jetpack Features or Firefox Add-ons. As their name implies, they are chrome-privileged and use dependency injection to offer functionality to non-chrome-privileged Jetpacks.
These modules essentially formalize the mechanism used within Jetpack to provide the jetpack namespace to Jetpacks.
Chrome Boosters have the following characteristics:
- They are a superset of the SecurableModule standard.
- They can be loaded and unloaded multiple times throughout the lifetime of their containing application.
- They have access to an onUnload() function that allows them to register callbacks to perform cleanup tasks when unloaded.
- They have full access to XPConnect's Components object, and all its sub-objects.
For security purposes, Chrome Boosters can only be accessed either
- locally, through a containing addon, or
- over secure HTTP to a trusted host.
Additionally, to encourage good coding practices and documentation, Chrome Boosters must have:
- A simple, straightforward mechanism for writing and executing test cases.
- An easy-to-learn documentation system capable of producing beautiful documentation.