Define constant objects with "var", not "const".

Objects defined with "const" cannot be exported by the method:

    let { SymbolName } = Cu.import("URL", {})

because variables defined with "const" are not stored as a property of the global object, at Firefox 44 and later.
This commit is contained in:
Piro / YUKI Hiroshi 2015-10-10 19:25:00 +09:00
parent ff2d3caed5
commit f2e07bd5b7
3 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ XPCOMUtils.defineLazyGetter(this, 'prefs', function() {
});
const AutoHideConstants = Object.freeze(inherit(TreeStyleTabConstants, {
var AutoHideConstants = Object.freeze(inherit(TreeStyleTabConstants, {
kMODE : 'treestyletab-tabbar-autohide-mode',
kMODE_DISABLED : 0,
kMODE_HIDE : 1,

View File

@ -36,7 +36,7 @@
const EXPORTED_SYMBOLS = ['TreeStyleTabConstants'];
const TreeStyleTabConstants = Object.freeze({
var TreeStyleTabConstants = Object.freeze({
/* attributes */
kID : 'treestyletab-id',
kCHILDREN : 'treestyletab-children',

View File

@ -68,7 +68,7 @@ const TST_PREF_PREFIX = 'extensions.treestyletab.';
const TST_PREF_VERSION = 10;
let TreeStyleTabUtils = {
var TreeStyleTabUtils = {
get prefs () {
return prefs;