Changes

Jump to: navigation, search

Labs/Jetpack/JEP/25

51 bytes added, 18:17, 15 September 2009
minor renamings to avoid confusion
This code doesn't necessarily work; it's just aspirational.
=== Jetpack Feature ===
Using Chrome Boosters from a Jetpack Feature is just like using them in any CommonJS-supported environment; the Jetpack runtime takes care of initializing the Chrome Booster framework when a Jetpack Feature is loaded, providing all necessary global functions to the Feature's global scope, and unloading the Chrome Boosters when the Feature is unloaded.
unloaded.
=== Chrome Booster, exporting to a Jetpack Feature ===
A Chrome Booster can use the forthcoming ChromeObjectWrapper protocol to decide which properties it wants to export to untrusted or semi-trusted Jetpack code.
In the above case, <tt>foo.bar()</tt> will be readable (but not writable) from Jetpacks that import the above module via a call to <tt>require()</tt>, but <tt>foo.baz</tt> will not be accessible at all.
=== Chrome Booster, exporting to a Jetpack Feature with capabilities ===
If a Jetpack Feature has capabilities associated with it, a Chrome Booster should be able to introspect into them and provide attenuated functionality based on said capabilities:
<pre class="brush:js;">
</pre>
Exactly how capabilities are specified for Jetpacka Feature&mdash;e.g., whether done explicitly by Jetpack Feature authors or implicitly via static analysis&mdash;is outside the scope of this document.
Exactly ''what'' capabilities are available in the Jetpack platform is also outside of the scope of this document, suffice to say that they will likely be developed organically: since the community will be creating Chrome Boosters that expose chrome functionality to semi-trusted content, we'll need to work together to figure out what the best capabilities are as the library of functionality is developed.
== Reference Implementation ==
874
edits

Navigation menu