1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 13:52:26 +01:00

Some JS completion functions. Still missing some properties...

This commit is contained in:
Kris Maglione
2009-11-13 20:20:53 -05:00
parent 00697620ca
commit 383e0d9ed1

View File

@@ -1115,14 +1115,7 @@ const Completion = Module("completion", {
context.filters.push(function (item) util.compareIgnoreCase(item.text.substr(0, this.filter.length), this.filter)); context.filters.push(function (item) util.compareIgnoreCase(item.text.substr(0, this.filter.length), this.filter));
if (obj == cache.evalContext) if (obj == cache.evalContext)
context.regenerate = true; context.regenerate = true;
context.generate = function () { context.generate = function () self.objectKeys(obj, !recurse);
try {
return self.objectKeys(obj, !recurse)
}
catch(e) {
liberator.reportError(e);
}
};
}; };
} }
// TODO: Make this a generic completion helper function. // TODO: Make this a generic completion helper function.
@@ -1145,14 +1138,14 @@ const Completion = Module("completion", {
for (let [, obj] in Iterator(objects)) { for (let [, obj] in Iterator(objects)) {
let name = obj[1] + " (substrings)"; let name = obj[1] + " (substrings)";
this.context.fork(obj[1], top[OFFSET], this, fill, this.context.fork(name, top[OFFSET], this, fill,
obj[0], name, compl, obj[0], name, compl,
false, filter, last, key.length); false, filter, last, key.length);
} }
for (let [, obj] in Iterator(objects)) { for (let [, obj] in Iterator(objects)) {
let name = obj[1] + " (prototype substrings)"; let name = obj[1] + " (prototype substrings)";
this.context.fork(obj[1], top[OFFSET], this, fill, this.context.fork(name, top[OFFSET], this, fill,
obj[0], name, function (a, b) compl(a, b, true), obj[0], name, function (a, b) compl(a, b, true),
false, filter, last, key.length); false, filter, last, key.length);
} }