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

Add Clear button to :downloads.

--HG--
branch : key-processing
This commit is contained in:
Kris Maglione
2011-01-24 00:37:32 -05:00
parent beb9d69eaa
commit 0a422502ba
4 changed files with 84 additions and 31 deletions

View File

@@ -893,20 +893,21 @@ var CommandLine = Module("commandline", {
*/
input: function _input(prompt, callback, extra) {
extra = extra || {};
let closure = extra.closure || extra;
this._input = {
submit: callback || extra.onAccept,
change: extra.onChange,
complete: extra.completer,
cancel: extra.onCancel
submit: callback || closure.onAccept,
change: closure.onChange,
complete: closure.completer,
cancel: closure.onCancel
};
modes.push(modes.COMMAND_LINE, modes.PROMPT | extra.extended,
update(Object.create(extra), {
onEvent: extra.onEvent || this.closure.onEvent,
onEvent: closure.onEvent || this.closure.onEvent,
leave: function leave(stack) {
commandline.leave(stack);
leave.supercall(this, stack);
leave.supercall(extra, stack);
},
keyModes: [extra.extended, modes.PROMPT]
}));