Skip to content

CommandExecutor

Description

Initializes the command executor with a reference to the Handsontable instance.

Members

commands

Source code

commandExecutor.commands : object

commonCallback

Source code

commandExecutor.commonCallback : function

Methods

execute

Source code

commandExecutor.execute(commandName, …params)

Execute command by its name.

ParamTypeDescription
commandNamestringCommand id.
…params*Arguments passed to command task.

registerCommand

Source code

commandExecutor.registerCommand(name, commandDescriptor)

Register command.

ParamTypeDescription
namestringCommand name.
commandDescriptorobjectCommand descriptor object with properties like key (command id), callback (task to execute), name (command name), disabled (command availability).

setCommonCallback

Source code

commandExecutor.setCommonCallback(callback)

Set common callback which will be trigger on every executed command.

ParamTypeDescription
callbackfunctionFunction which will be fired on every command execute.