mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-19 21:57:59 +01:00
Use proxy of window for modules prototype. Closes issue #928.
This commit is contained in:
12
common/bootstrap.js
vendored
12
common/bootstrap.js
vendored
@@ -172,7 +172,17 @@ let JSMLoader = {
|
||||
let module = this.modules[name];
|
||||
if (target)
|
||||
for each (let symbol in module.EXPORTED_SYMBOLS)
|
||||
target[symbol] = module[symbol];
|
||||
try {
|
||||
Object.defineProperty(target, symbol, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: module[symbol]
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
target[symbol] = module[symbol];
|
||||
}
|
||||
|
||||
return module;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user