Expand all

ve.TriggerListener

Constructor

new ve.TriggerListener(commands, commandRegistry) #

Trigger listener

Parameters:

Name Type Description
commands Array.<string>

Commands to listen to triggers for

commandRegistry ve.ui.CommandRegistry

Command registry to get commands from

Source:
Trigger listener

Methods

getCommandByTrigger(trigger) → {ve.ui.Command|undefined} #

Get command associated with trigger string.

Parameters:

Name Type Description
trigger string
Source:

Returns:

Type
ve.ui.Command | undefined
Get command associated with trigger string.

getCommands() → {Array.<string>} #

Get list of commands.

Source:

Returns:

Commands

Type
Array.<string>
Get list of commands.

getTriggers(name) → {Array.<ve.ui.Trigger>|undefined} #

Get triggers for a specified name.

Parameters:

Name Type Description
name string

Trigger name

Source:

Returns:

Type
Array.<ve.ui.Trigger> | undefined
Get triggers for a specified name.