1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 17:27:58 +01:00

Bootstrap cleanup work.

--HG--
branch : bootstrapped
This commit is contained in:
Kris Maglione
2010-12-23 23:27:33 -05:00
parent c396c279c4
commit 33e16f3183
11 changed files with 89 additions and 23 deletions

View File

@@ -281,6 +281,8 @@ const Option = Class("Option", {
*/
description: "",
cleanupValue: null,
/**
* @property {function(CompletionContext, Args)} This option's completer.
* @see CompletionContext
@@ -637,6 +639,12 @@ const Options = Module("options", {
}, window);
},
cleanup: function cleanup() {
for (let opt in this)
if (opt.cleanupValue != null)
opt.value = opt.parse(opt.cleanupValue);
},
/** @property {Iterator(Option)} @private */
__iterator__: function ()
values(this._options.sort(function (a, b) String.localeCompare(a.name, b.name))),