import-headjs-globals¶
从 head.js 以及 head.js 导入的任何文件中导入全局变量(只要我们能够正确解析路径)。
此规则包含在测试配置中。
支持以下文件导入模式
Services.scriptloader.loadSubScript(path)loader.loadSubScript(path)loadSubScript(path)loadHelperScript(path)import-globals-from path
如果路径不存在,例如因为它是生成的,例如 testdir + "/somefile.js",我们会尽力解析它。
支持以下模式
loader.lazyRequireGetter(this, "name2"loader.lazyServiceGetter(this, "name3"loader.lazyGetter(this, "toolboxStrings"ChromeUtils.defineLazyGetter(this, "clipboardHelper"