Changes

Jump to: navigation, search

Labs/Jetpack/JEP/25

27 bytes added, 20:56, 26 September 2009
renamed booster.js to securable-module.js
When used in a XULRunner extension, the Booster framework should have the following additional characteristics:
* Adding Booster functionality to an existing XULRunner extension should be as painless as possible; ideally, it should consist merely of adding a single script, <tt>boostersecurable-module.js</tt>, and any desired SecurableModule files.* Using <tt>boostersecurable-module.js</tt> should be just as easy in both a chrome-privileged document and a [https://developer.mozilla.org/en/Using_JavaScript_code_modules JS module] (not to be confused with a SecurableModule).
Note that for security purposes, Boosters with chrome privileges should only be accessed either
<html>
<!-- This script makes the SecurableModule global available. -->
<script src="boostersecurable-module.js"></script>
<script>
// Create a loader for SecurableModules that gives them chrome
Booster functionality should be just as easy to access if the
calling code is in a JS module instead of a page. As such,
<tt>boostersecurable-module.js</tt> is engineered to detect which context
it's loaded in and "just work" accordingly:
<pre class="brush:js;">
var SecurableModule = {};
Components.utils.import( "resource://some_extension/content/boostersecurable-module.js", SecurableModule);
var loader = SecurableModule.Loader({
874
edits

Navigation menu