874
edits
(→XULRunner extension, in a chrome-privileged page/window: more syntax highlighting) |
("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=" | <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> | <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/ | Components.utils.import("resource://some_extension/content/booster.js", | ||
SecurableModule); | SecurableModule); | ||
edits