history

history.execute

execute(command: Command<T>): T

Execute a Command through the undo/redo system.

The command is added to the current pending group (or the active transaction if one is open) and scheduled for auto-commit. The command's execute() method is called synchronously; its undo() method will be called when the user invokes undo().

commandCommand<T>Any object implementing the Command interface.

Returns: T

Example

api.history.execute(new MyCustomCommand(store, payload));