Access the Add-on SDK from within a traditional XUL-based add-on?
问题 I have a large and complex XUL-based addon for which I need to use a few functions from the Add-on SDK. Is this possible? If so, does anyone have working sample code, preferably using the page-worker module? 回答1: The following is the way devtools does it, but certain modules will choke (the obvious candidate being self ). I think you will have better luck with low-level modules. let {Loader} = Cu.import("resource://gre/modules/commonjs/toolkit/loader.js", {}); let loader = new Loader.Loader({