874
edits
Changes
m
minor rewordings
== Problem Statement Definition ==
It's currently difficult to share JavaScript code between different contexts in the Mozilla platform:
All of these problems are problems for Jetpack, and are barriers to a truly vibrant code-sharing ecosystem.
== Our Solution ==
[http://wiki.commonjs.org/wiki/CommonJS CommonJS] is a grassroots group of JavaScript enthusiasts and professionals who are creating a common set of standards to make code easier to reuse. One such standard is [http://wiki.commonjs.org/wiki/CommonJS/Modules/SecurableModules SecurableModule], which provides a simple yet elegant module mechanism that works in any kind of context, including the web.
<b>Chrome Boosters</b> are a superset of the SecurableModule standard that solve some issues specific to the Mozilla platform, and are intended to be used from both Jetpack Features and XULRunner extensions (e.g., Firefox/Thunderbird add-ons). Our hope is that, aside from solving the aforementioned problems, this mechanism will enable a vibrant code-sharing ecosystem that includes between Jetpack developers, Add-on developers, web developers, and the greater JavaScript community as a whole.
As their name implies, they Chrome Boosters are chrome-privileged and can use dependency injection to offer functionality to non-chrome-privileged Jetpacks—or, if used in a XULRunner extension, they can be used to provide functionality to other chrome-privileged code.
Once we have a substrate of Chrome Boosters available, we'll be able to create "Content Boosters" that consist solely of unprivileged functionality that itself relies on capabilities provided to them via Chrome Boosters.