loadSubScript oder loadSubScriptWithOptions werden aktuell vier Mal verteilt auf drei verschiedene Dateien verwendet. Ich habe einfach nur im Ordner nach loadSubScript gesucht.
JavaScript
Services.scriptloader.loadSubScript(mainFileURI, this, 'UTF-8');
Services.scriptloader.loadSubScript(this.utilFileURI, window, "UTF-8");
Services.scriptloader.loadSubScript(this.ucFileURI, window, "UTF-8");
Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Components.interfaces.mozIJSSubScriptLoader)
.loadSubScriptWithOptions(userChrome.getURLSpecFromActualFile(aFile), {
target: window,
charset: userChrome.charSet,
ignoreCache: userChrome.ignoreCache
});
=>
JavaScript
Services.scriptloader.loadSubScriptWithOptions(mainFileURI, {
target: this,
charset: 'UTF-8',
allowUnsafeURL: true
});
Services.scriptloader.loadSubScriptWithOptions(this.utilFileURI, {
target: window,
charset: 'UTF-8',
allowUnsafeURL: true
});
Services.scriptloader.loadSubScriptWithOptions(this.ucFileURI, {
target: window,
charset: 'UTF-8',
allowUnsafeURL: true
});
Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Components.interfaces.mozIJSSubScriptLoader)
.loadSubScriptWithOptions(userChrome.getURLSpecFromActualFile(aFile), {
target: window,
charset: userChrome.charSet,
ignoreCache: userChrome.ignoreCache,
allowUnsafeURL: true
});
Alles anzeigen