1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 10:37:59 +01:00

Merge default.

--HG--
branch : groups
This commit is contained in:
Kris Maglione
2011-02-07 01:09:33 -05:00
parent 9189715e9c
commit 76aaf150fa
5 changed files with 37 additions and 14 deletions

View File

@@ -79,9 +79,11 @@ var ProcessorStack = Class("ProcessorStack", {
Events.kill(this.events[this.events.length - 1]); Events.kill(this.events[this.events.length - 1]);
if (result === Events.PASS || result === Events.ABORT) { if (result === Events.PASS || result === Events.ABORT) {
dbg("REFEED: " + this.events.filter(function (e) e.getPreventDefault()).map(events.closure.toString).join("")); let list = this.events.filter(function (e) e.getPreventDefault());
this.events.filter(function (e) e.getPreventDefault()) if (list.length)
.forEach(function (event, i) { events.dbg("REFEED: " + list.map(events.closure.toString).join(""));
list.forEach(function (event, i) {
let elem = event.originalTarget; let elem = event.originalTarget;
if (event.originalTarget) { if (event.originalTarget) {
let doc = elem.ownerDocument || elem.document || elem; let doc = elem.ownerDocument || elem.document || elem;
@@ -307,6 +309,8 @@ var EventHive = Class("EventHive", Group.Hive, {
* @instance events * @instance events
*/ */
var Events = Module("events", { var Events = Module("events", {
dbg: function () {},
init: function () { init: function () {
const self = this; const self = this;

View File

@@ -1012,7 +1012,7 @@ var Timer = Class("Timer", {
notify: function (timer, force) { notify: function (timer, force) {
try { try {
if (util.rehashing || typeof util === "undefined" || !force && this.doneAt == 0) if (loaded.util && util.rehashing || typeof util === "undefined" || !force && this.doneAt == 0)
return; return;
this._timer.cancel(); this._timer.cancel();

View File

@@ -36,6 +36,8 @@ var JavaScript = Module("javascript", {
}, },
}), }),
lazyInit: true,
newContext: function () this.modules.newContext(this.modules.userContext), newContext: function () this.modules.newContext(this.modules.userContext),
get completers() JavaScript.completers, // For backward compatibility get completers() JavaScript.completers, // For backward compatibility

View File

@@ -291,18 +291,18 @@ var Overlay = Module("Overlay", {
}); });
}); });
function frob(name) { function frob(name) { (deferredInit[name] || []).forEach(call); }
// util.dump(" ======================== FROB " + name + " ======================== ");
(deferredInit[name] || []).forEach(call);
}
frob("init"); frob("init");
defineModule.modules.forEach(function ({ constructor: { className } }) { defineModule.modules.forEach(function ({ lazyInit, constructor: { className } }) {
modules.__defineGetter__(className, function () { if (!lazyInit)
delete modules[className];
frob(className); frob(className);
return modules[className] = modules[className]; else
}); modules.__defineGetter__(className, function () {
delete modules[className];
frob(className);
return modules[className] = modules[className];
});
}); });
// Module.list.forEach(load); // Module.list.forEach(load);

View File

@@ -483,7 +483,24 @@ var tests = {
sanitize: { sanitize: {
// Skip details for now. // Skip details for now.
completions: [ completions: [
"", ["", function (context) ["all",
"cache",
"downloads",
"formdata",
"offlineapps",
"passwords",
"sessions",
"cookies",
"history",
"host",
"sitesettings",
"commandline",
"messages",
"macros",
"marks",
"options"
].every(function (item) context.allItems.items.some(function ({ text }) item == text))
],
"-", "-",
"-host=", "-host=",
"-timespan=" "-timespan="