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:
@@ -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))),
|
||||
|
||||
Reference in New Issue
Block a user