Changes

Jump to: navigation, search

Labs/Jetpack/JEP/25

506 bytes added, 16:12, 15 September 2009
added section on Jetpack sample code
have any pressing reason to, since JS modules themselves are never
unloaded.
 
=== Jetpack ===
 
A Chrome Booster can use the forthcoming ChromeObjectWrapper protocol to decide which properties it wants to export to untrusted or semi-trusted Jetpack code.
 
<pre class="brush:js;">
exports.foo = {
__exposed__ = {bar: 'r'},
bar: function bar() { /* ... */ },
baz: 5
};
</pre>
 
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.
== Reference Implementation ==
874
edits

Navigation menu