Labs/Jetpack/JEP/25: Difference between revisions

Jump to navigation Jump to search
"securable-module.js" -> "booster.js"
("securable-module.js" -> "booster.js")
Line 39: Line 39:
<html>
<html>
<!-- This script makes the SecurableModule global available. -->
<!-- This script makes the SecurableModule global available. -->
<script src="securable-module.js"></script>
<script src="booster.js"></script>
<script>
<script>
   // Create a loader for SecurableModules that gives them chrome
   // Create a loader for SecurableModules that gives them chrome
Line 71: Line 71:
Chrome Booster functionality should be just as easy to access if the
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,
calling code is in a JS module instead of a page. As such,
<tt>securable-module.js</tt> is engineered to detect which context
<tt>booster.js</tt> is engineered to detect which context
it's loaded in and "just work" accordingly:
it's loaded in and "just work" accordingly:


Line 78: Line 78:
// loaded as a JS module, too:
// loaded as a JS module, too:
var SecurableModule = {};
var SecurableModule = {};
Components.utils.import("resource://some_extension/content/securable-module.js",
Components.utils.import("resource://some_extension/content/booster.js",
                         SecurableModule);
                         SecurableModule);


874

edits

Navigation menu