Class: CommandExecutor

CommandExecutor

Command executor for ContextMenu.

Methods

execute(commandName, params)

Execute command by its name.

Parameters:
Name Type Description
commandName String

Command id.

params * repeatable

Arguments passed to command task.

registerCommand(name, commandDescriptor)

Register command.

Parameters:
Name Type Description
name String

Command name.

commandDescriptor Object

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

setCommonCallback(callback)

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

Parameters:
Name Type Description
callback function

Function which will be fired on every command execute.