aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpapush2021-04-29 15:48:53 +0200
committerpapush2021-04-29 15:48:53 +0200
commit7d21c850b011d53b73de8037f49009912440b7d9 (patch)
treebecc996cf2969d995c559aedb395e4de3ca12198
parent775dc998bda0b2ed56ff17492d28825775634f60 (diff)
fix xpcom.js not exporting all its symbols
there's likely a better way to do this, but xul/xpcom doc is hard to come by these days. Maybe that ChromeUtils thing i saw in a few places? Also I think Services.jsm should be used instead but whatever it works
-rw-r--r--chrome/js/xpcom.js30
1 files changed, 22 insertions, 8 deletions
diff --git a/chrome/js/xpcom.js b/chrome/js/xpcom.js
index 2d18ff3..6a9313d 100644
--- a/chrome/js/xpcom.js
+++ b/chrome/js/xpcom.js
@@ -1,4 +1,3 @@
-
Ci = Components.interfaces;
Cc = Components.classes;
Cr = Components.results;
@@ -25,10 +24,25 @@ const StringBundleService = Service("@mozilla.org/intl/stringbundle;1", "nsIStri
const ConsoleService = Service("@mozilla.org/consoleservice;1", "nsIConsoleService");
const PrefServie = Service("@mozilla.org/preferences-service;1", "nsIPrefService");
const DirectoryService = Service("@mozilla.org/file/directory_service;1", "nsIProperties");
-
-var EXPORTED_SYMBOLS = [];
-for (var name in this) {
- if (name != 'Service' && name != 'QueryInterface' && name != 'name' && name != 'EXPORTED_SYMBOLS') {
- EXPORTED_SYMBOLS.push(name);
- }
-}
+
+var EXPORTED_SYMBOLS = [
+ 'ServerSocket',
+ 'ScriptableInputStream',
+ 'FileInputStream',
+ 'ConverterInputStream',
+ 'FileOutputStream',
+ 'ConverterOutputStream',
+ 'LocalFile',
+ 'FilePicker',
+ 'FilePickerMode',
+ 'PromptService',
+ 'IOService',
+ 'LocaleService',
+ 'StringBundleService',
+ 'ConsoleService',
+ 'PrefServie',
+ 'DirectoryService',
+ 'Ci',
+ 'Cc',
+ 'Cr'
+];