1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-14 03:45:45 +01:00

Add tests for dead help links. Fix some minor bugs. Show error when trying to modify a builtin group rather than failing silently.

This commit is contained in:
Kris Maglione
2011-02-21 16:22:30 -05:00
parent d62c93aef0
commit 234f50bce8
18 changed files with 92 additions and 50 deletions

View File

@@ -229,9 +229,9 @@ var Addon = Class("Addon", {
if (node.update && node.update !== callee)
node.update();
let event = this.document.createEvent("Events");
let event = this.list.document.createEvent("Events");
event.initEvent("dactyl-commandupdate", true, false);
this.document.dispatchEvent(event);
this.list.document.dispatchEvent(event);
}
});
@@ -261,9 +261,9 @@ var AddonList = Class("AddonList", {
this.ready = false;
AddonManager.getAddonsByTypes(types, this.closure(function (addons) {
addons.forEach(this.closure.addAddon);
this.ready = true;
this.update();
this._addons = addons;
if (this.document)
this._init();
}));
AddonManager.addAddonListener(this);
},
@@ -271,6 +271,12 @@ var AddonList = Class("AddonList", {
AddonManager.removeAddonListener(this);
},
_init: function _init() {
this._addons.forEach(this.closure.addAddon);
this.ready = true;
this.update();
},
message: Class.memoize(function () {
XML.ignoreWhitespace = true;
@@ -284,6 +290,9 @@ var AddonList = Class("AddonList", {
</tr>
</table>, this.document, this.nodes);
if (this._addons)
this._init();
return this.nodes.list;
}),