1
0
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:
Kris Maglione
2014-03-15 14:32:58 -07:00
parent e1a6446fcf
commit 5d12a470bc
3 changed files with 35 additions and 14 deletions

12
common/bootstrap.js vendored
View File

@@ -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;
},