1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 13:54:21 +01:00

No more randomly generated package subtree paths.

This commit is contained in:
Kris Maglione
2012-01-13 02:25:57 -05:00
parent cc38e7057d
commit cbee50966b
7 changed files with 291 additions and 275 deletions

View File

@@ -81,23 +81,15 @@ var Binding = Class("Binding", {
return res;
})
});
for (let [k, v] in Iterator(XPCOMShim([Ci.nsIDOMElement]))) {
let key = k;
let prop = { configurable: true, enumerable: false };
if (callable(v))
update(prop, {
value: function () this.node[key].apply(this.node, arguments),
writable: true
});
else
update(prop, {
get: function () this.node[k],
set: function (val) this.node[k] = val
});
Object.defineProperty(Binding.prototype, key, prop);
}
["appendChild", "getAttribute", "insertBefore", "setAttribute"].forEach(function (key) {
Object.defineProperty(Binding.prototype, key, {
configurable: true,
enumerable: false,
value: function () this.node[key].apply(this.node, arguments),
writable: true
});
});
var Template = Module("Template", {
add: function add(a, b) a + b,